three_sixteen
Gawd
- Joined
- Feb 15, 2002
- Messages
- 1,003
Hey everyone, I've got a pretty straightforward UDP client set up - but I'm getting some issues with the Windows firewall and event log messages because it seems like the UDP client is trying to listen on a port even though I haven't told it to.
I'm beginning to wonder if the udpclient class listens on a port regardless of whether or not you are actually using the recieve function. Was hoping someone might have some insight as to how I can stop it from listening.
I'm beginning to wonder if the udpclient class listens on a port regardless of whether or not you are actually using the recieve function. Was hoping someone might have some insight as to how I can stop it from listening.
Code:
dim udpClient As New UdpClient
dim message as Byte() = New Byte() {}
dim x As Integer
Try
message = encoding.ASCII.GetBytes("text here")
x = udpClient.Send(message, message.length, servername, port)
catch ex as Exception
Finally
udpclient.close()
ctype(udpClient, IDisposable).dispose()
End Try