Socket error
-
- i am using sockets ... - whenever i try to send text i get the following error...
System.InvalidOperationException: The operation is not allowed on non-connected sockets.
at InTheHand.Net.Sockets.BluetoothClient.GetStream()- the code is the following...
Dim stream As System.IO.Stream = Nothing
Try
stream = client.GetStream()
stream.Write(Buffer, 0, BufferLen)
Catch e As Exception
MsgBox("Error sending" & e.ToString)
Finally
If (Not stream Is Nothing) Then
stream.Close()
End If
End Try- please help me out here... thanks...
J A Nasir K
-
- i am using sockets ... - whenever i try to send text i get the following error...
System.InvalidOperationException: The operation is not allowed on non-connected sockets.
at InTheHand.Net.Sockets.BluetoothClient.GetStream()- the code is the following...
Dim stream As System.IO.Stream = Nothing
Try
stream = client.GetStream()
stream.Write(Buffer, 0, BufferLen)
Catch e As Exception
MsgBox("Error sending" & e.ToString)
Finally
If (Not stream Is Nothing) Then
stream.Close()
End If
End Try- please help me out here... thanks...
J A Nasir K
Because you don't have a connection opened yet?? Since you haven't provided any of the connection code, it's impossible to say what the problem is.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009...