Changed Proxy API.

Trying to separate the interfaces of external logic (API) and the
interfaces of internal logic of proxy module (receive/send messages).