Media/WebRTC/WebRTCE10S/NetworkProxyInterface: Difference between revisions

 
Line 35: Line 35:


==== Packet Transmisson and Reception ====
==== Packet Transmisson and Reception ====
From content to chrome, we do:
  SendTo(SocketHandle handle,
              const void *buf,
              PRInt32 amount,
              PRIntn flags,
              PRNetAddr remoteAddress);
This call causes a packet to be sent to remoteAddress if (if possible);.
These values correspond to those in PR_SendTo (https://developer.mozilla.org/en-US/docs/PR_SendTo).
Note that this is asynchronous so there is no error return.
From chrome to content:
  PacketReceived(SocketHandle handle,
                          const void *buf,
                          PRInt32 amount,
                          PRNetAddr remoteAddress);
This message indicates that a packet has been received from some remote
side. Handle is the socket that the packet came in on. buf and amount contain
the packet. remoteAddress is the source address.
Finally:
  Error(SocketHandle)
This message indicates that something went wrong on the socket in
question and it is likely that you will no longer be able to send/receive.
Confirmed users
214

edits