Author | Message | Time |
---|---|---|
Ringo | Hi, i was wundering if anyone could give me a little infomation on UPD winsocks and how to get it receveing and sending to a SC game server. "Run time error '10047';" Address family is not supported Is all i can get from it :( I noticed UserLoser say in a differnt post, that you dont connect to UDP or somthing, can anyone tell me more about this please? Thanks in advance. | December 12, 2004, 3:33 PM |
The-FooL | The UDP protocol does not involve connecting somewhere. You just send data to an address. | December 12, 2004, 7:05 PM |
LoRd | December 12, 2004, 8:01 PM | |
St0rm.iD | argh there is no "scgs" | December 12, 2004, 10:51 PM |
Yegg | Since we're on the topic of UDP and I don;t think I should start a new topic, which type of connection would be better to use, UDP or TCP? | December 12, 2004, 11:28 PM |
St0rm.iD | For what? | December 13, 2004, 1:10 AM |
Ringo | Hmm, i have learned alot more about the UPD protocol today. But i am having a little trubble sending data via my UPD winsock because im not sure how to get the correct address :( [code] Dim MyIP As String, Doaway() As String MyIP = Inet1.OpenURL("http://pchelplive.com/ip.php") RemoteUPD.text = MyIP then tagetIP = RemoteUPD.text Doaway = Split(TargetIP, " ") RemoteUPD.text = Doaway(0) [/code] now i am useing RemoteUPD.text as my hostaddress and 6112 as hostport, but i know this is not the right/best way to obtain the right IP i am after. :'( As i am coding this project on a networked computer, i noticed i am going about this wrong. Does anyone have any idea how i can obtain my battle net IP address from my main TCP winsock just after sending/receveing 0x50 to use as a send address for my UPD winsock? [VB]Anything will be of great help, thanks. | December 13, 2004, 2:20 AM |
UserLoser. | [quote author=Ringo link=topic=9875.msg92136#msg92136 date=1102904428] Hmm, i have learned alot more about the UPD protocol today. But i am having a little trubble sending data via my UPD winsock because im not sure how to get the correct address :( [code] Dim MyIP As String, Doaway() As String MyIP = Inet1.OpenURL("http://pchelplive.com/ip.php") RemoteUPD.text = MyIP then tagetIP = RemoteUPD.text Doaway = Split(TargetIP, " ") RemoteUPD.text = Doaway(0) [/code] now i am useing RemoteUPD.text as my hostaddress and 6112 as hostport, but i know this is not the right/best way to obtain the right IP i am after. :'( As i am coding this project on a networked computer, i noticed i am going about this wrong. Does anyone have any idea how i can obtain my battle net IP address from my main TCP winsock just after sending/receveing 0x50 to use as a send address for my UPD winsock? [VB]Anything will be of great help, thanks. [/quote] It's UDP. And there's no connections (like stated many times in the past day or so). Assuming you're using mswinsck.ocx, to get the IPv4 address of the remote host, try: socket.RemoteHostIP | December 13, 2004, 4:46 AM |
Ringo | ye, i understand that bit, but the main problem im having atm is understanding what address is used to do this. When ever i packet log this, my SC game sends/receves from my ISP address @ port 6112, but when i send data to that via a UPD winsock and packet log it, its sending it to the address: 0.0.0.0. Any ideas? **Edit** 63.241.83.13:6112 > 192.168.0.135:4562 Recv FF 07 0A 00 02 00 00 00 00 00 (Passed 0x07) 0.0.0.0:4564 > :0 SendTo 0000 09 00 00 00 I know i am only sending a blank UPD packet on logon but first i am trying to get the send to address right ;( An example of how it should be: 63.241.83.13:6112 > 192.168.0.135:4562 Recv 192.168.0.135:6112> :0 SendTo This is the sort of thing iv been trying (In VB6): [code] WsUPD.RemoteHost = WsTCP.RemoteHostIP WsUPD.RemotePort = "6112" PacketUPD &H9 [/code] Iv tryed: WsUPD.RemoteHost = WsTCP.LocalIP WsUPD.RemoteHost = WsTCP WsUPD.RemoteHost = WsTCP.Remotehost WsUPD.RemoteHost = my ISP address gotten from a php web address. And many many other combos, but it will only seem to send to 0.0.0.0 and wrong port, rather than the port and IP i definded. Please note: Im not trying to "connect" to my UPD winsock in anyway, i am purely having send address problems. Or am i? any help would be great, thanks! | December 13, 2004, 11:08 AM |
Soul Taker | UDP. D before P! And, try binding the socket to a port first. I honestly forget if you have to bind a UDP socket to just send a packet or not, but it's worth trying and I'm too lazy to look it up for you :P | December 13, 2004, 3:31 PM |
Adron | Depending on how you packet log it, it may be perfectly OK if it says it is seeing packets *from* 0.0.0.0. | December 13, 2004, 6:33 PM |