actually i have develop the network project in winforms.
my problem is socket error in one form(router form) that socket error like
"system.argumentNullException:value can not be null.
parameter name:buffer
at system.Net.Sockets.socket.Send(Byte[]buffer,int32 offset,int32size,SocketFlags socketFlags,SocketError&errorCode)
at system.Net.Sockets.socket.Send(Byte[]buffer,int32 offset,int32size,SocketFlags socketFlags)
at system.Net.Sockets.socket.Send(Byte[]buffer)
at simulation.routers.send()in c:\Documentandsettings\Adminstrator\desktop\sourcecode\routers\router.cs:line 51"
socket error occur in send method like as
private void Send()
{
try
{
IPAddress[] ipAddress = Dns.GetHostAddresses(textBox1.Text);
IPEndPoint ipEnd = new IPEndPoint(ipAddress[0], 5656);
Socket clientSock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.IP);
clientSock.Connect(ipEnd);
clientSock.Send(ReceiverCode.send);
clientSock.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
in this method contain error statement
clientSock.Send(ReceiverCode.send);
this project had completed using wireless network(wi-fi)on yesterday.
but today morning my wifi not working then i have run the project using another wifi and local
area connection but still my project have socket error
pls help me