Symbian3/SDK/Source/GUID-F79A3DD7-DB91-545F-8165-F1F2DD6D0AD2.dita
changeset 8 ae94777fff8f
parent 7 51a74ef9ed63
child 13 48780e181b38
equal deleted inserted replaced
7:51a74ef9ed63 8:ae94777fff8f
    10 <!DOCTYPE concept
    10 <!DOCTYPE concept
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    12 <concept xml:lang="en" id="GUID-F79A3DD7-DB91-545F-8165-F1F2DD6D0AD2"><title>Creating an Implicitly Bound Socket</title><shortdesc>This topic describes how create an implicitly bound socket. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody><ul><li id="GUID-B46FE3BB-A098-5234-86F4-DF6332B6497E"><p>An application opens a socket using the default interface connection and binds to a port and IP address of the connection. The application receives inbound traffic only from the interface the socket is bound to. </p> <p>For example, an application opens an implicit UDP socket and listens on port 8000. The UDP socket binds to interface IP address <codeph>10.253.4.134</codeph>. The UDP socket must receive data packets from this interface only. </p> </li> <li id="GUID-D83D0586-F746-5099-8778-248C3B8AD9EC"><p>If an application opens a socket and does not bind to a port or IP address of the default interface connection, then the application receives inbound traffic from multiple interfaces. </p> <p>For example, if an application opens an implicit UDP socket and does not bind the port 8000 to the IP address of the default interface connection, then the application receives inbound traffic from all the interfaces. </p> </li> </ul> <example><title>Implicit binding example</title> <p>Client B creates a socket with implicit binding without specifying the interface connection. </p> <codeblock id="GUID-A2F39285-5934-5FDC-8E94-1EDBD7A7446E" xml:space="preserve">
    12 <concept xml:lang="en" id="GUID-F79A3DD7-DB91-545F-8165-F1F2DD6D0AD2"><title>Creating an Implicitly Bound Socket</title><shortdesc>This topic describes how create an implicitly bound socket. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody><ul><li id="GUID-B46FE3BB-A098-5234-86F4-DF6332B6497E"><p>An application opens a socket using the default interface connection and binds to a port and IP address of the connection. The application receives inbound traffic only from the interface the socket is bound to. </p> <p>For example, an application opens an implicit UDP socket and listens on port 8000. The UDP socket binds to interface IP address <codeph>10.253.4.134</codeph>. The UDP socket must receive data packets from this interface only. </p> </li> <li id="GUID-D83D0586-F746-5099-8778-248C3B8AD9EC"><p>If an application opens a socket and does not bind to a port or IP address of the default interface connection, then the application receives inbound traffic from multiple interfaces. </p> <p>For example, if an application opens an implicit UDP socket and does not bind the port 8000 to the IP address of the default interface connection, then the application receives inbound traffic from all the interfaces. </p> </li> </ul> <example><title>Implicit binding example</title> <p>Client B creates a socket with implicit binding without specifying the interface connection. </p> <codeblock id="GUID-A2F39285-5934-5FDC-8E94-1EDBD7A7446E" xml:space="preserve">
    13 server = RSocketServ.Connect();
    13 server = RSocketServ.Connect();
    14 socket1 = RSocket.Open(server);
    14 socket1 = RSocket.Open(server);
    15 </codeblock> <p>ESock creates the socket within the default connection and subconnection. </p> <fig id="GUID-31F625B2-DB7F-51F8-AB6D-F06925DF1A64"><image href="GUID-77F02412-00E1-59F9-A875-3147529F83F5_d0e117503_href.png" placement="inline"/></fig> </example> </conbody><related-links><link href="GUID-D1BCE2D9-04B5-5C39-A50B-C5BBDAAFEFED.dita"><linktext>Socket Binding</linktext> </link> </related-links></concept>
    15 </codeblock> <p>ESock creates the socket within the default connection and subconnection. </p> <fig id="GUID-31F625B2-DB7F-51F8-AB6D-F06925DF1A64"><image href="GUID-77F02412-00E1-59F9-A875-3147529F83F5_d0e110965_href.png" placement="inline"/></fig> </example> </conbody><related-links><link href="GUID-D1BCE2D9-04B5-5C39-A50B-C5BBDAAFEFED.dita"><linktext>Socket Binding</linktext> </link> </related-links></concept>