Created
February 23, 2013 18:40
-
-
Save abbas-oveissi/5020824 to your computer and use it in GitHub Desktop.
sample C# code for socket 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IPAddress ip = IPAddress.Parse("192.168.1.2"); | |
IPEndPoint IpPort = new IPEndPoint(ip, Convert.ToInt32("12345")); | |
Socket main_socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); | |
main_socket.Bind(IpPort); | |
//////////////////////////////////////////////////////////////////// | |
IPAddress ip = IPAddress.Parse("192.168.1.2"); | |
IPEndPoint IpPort = new IPEndPoint(ip, Convert.ToInt32("12345")); | |
Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); | |
socket.Connect(IpPort); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment