Well, I'm making a bot for multiplayer game. Game works on both protocol - TCP and UDP. I did the TCP part, but I'm having problems with UDP now. I know I don't need to connect Winsock cuz UDP protocol is conectionless, but how do I do this then?
So, considering my app is client, how will it receive UDP packets from server if it does not connect?
More precisely, I need my app to send back every UDP packet it receives. This is what I tried, but I guess there's something wrong with this, cuz it does not receive any packet.
Code:Private Sub Command2_Click() Winsock3.RemoteHost = Text2.Text Winsock3.RemotePort = Text3.Text End SubCode:Private Sub Winsock3_DataArrival(ByVal bytesTotal As Long) Dim UDPPacket() As Byte Winsock3.GetData UDPPacket Winsock3.SendData UDPPacket End Sub




Reply With Quote
