Background:
Im working on a remote console (rcon) for accessing dedicated quake3 servers.
Quake 3 uses UDP and Out Of Bands packets to communicate in ASCII text
(see more here http://web.archive.org/web/200108021...andsHowto.html)
I used the UDPClient.Send() and Recive() to test this and it worked quite well, except for that since i dont know how many packets
the
server will send in response to the user command, then UDPClient will halt the program while its waiting for the next packet to
arrive, and there is no way to check that it's the _last_ package, and no timeout value as far as i know.
While googling i also found this article that said that UdpClient is broken http://www.codeproject.com/buglist/udpclientbug.asp
Problem:
I went from UDPClient to using System.Net.Sockets.Socket (wich i presume is the correct to use)
but i'm confused on what the AdressFamily, and SocketType arguments do?
The help function didn't provide much in an in-depth explanation as to what these do either.
In AdressFamiliy for example there was one option for IPv4 and one for IPv6. I would like to provide both for future compatiblity.
Is that possible?
The ipAdress and Port of the host was an argument to the UDPClient.Send() method.
What/Where do i specify ip when using System.Net.Sockets.Socket, and how do i set a Timeout value?
Private Function transmit2(ByVal value() As Byte) As String
Dim udpTR As New Sockets.Socket(Sockets.AddressFamily.Unknown, Sockets.SocketType.Dgram, Sockets.ProtocolType.Udp)
Dim b As Integer = udpTR.Send(value, value.Length, Sockets.SocketFlags.OutOfBand)