Converting IP Addresses

IP Address Text Entry Box

You can use a MaskedTextBox with the mask “###.###.###.###”
However its often best just to use a standard text box as the masked text box approah creates issues. Note that the Windows network setup IP address box is not based on a standard tool unfortunately. (more…)

Setting Special Socket Options

Use SetSocketOption


	TcpSocket->SetSocketOption(SocketOptionLevel::Socket, SocketOptionName::DontLinger, true);
	TcpSocket->SetSocketOption(SocketOptionLevel::Socket, SocketOptionName::ReuseAddress, true);

UDP Client Simple Transmit Only


	UdpClient^ udpClient1;
	udpClient1 = gcnew UdpClient;
	IPAddress ^address;
	int byteId;
	array<Byte>^sendBytes = gcnew array<Byte>(1500);

 (more...)

UDP Server

In Your .h File


#define	RECEIVE_BUFFER_SIZE						1500

private: Socket ^serverSocket;

 (more...)