two UDP socket on the same machine..
-
I have an application "app1" which create a UDP socket with port no. 6677.This app broadcast a data packet. I hav another application "app2" which also create UDP socke which always listen 6677.Whenever the data packet comes it do certain operations. Now problem is , when I run these to apps on different machines in the network, app2 detects the data packet.But when I run both the applications on the same machine,app2 never detects the data packet. What may e the problem??? UDP socket related code in app2 is pasted here.... wsClientRecieve.RemotePort = 6677 wsClientRecieve.RemoteHost = "127.0.0.1" wsClientRecieve.LocalPort = 6677 wsClientRecieve.Bind 6677 Thanks in adv..
-
I have an application "app1" which create a UDP socket with port no. 6677.This app broadcast a data packet. I hav another application "app2" which also create UDP socke which always listen 6677.Whenever the data packet comes it do certain operations. Now problem is , when I run these to apps on different machines in the network, app2 detects the data packet.But when I run both the applications on the same machine,app2 never detects the data packet. What may e the problem??? UDP socket related code in app2 is pasted here.... wsClientRecieve.RemotePort = 6677 wsClientRecieve.RemoteHost = "127.0.0.1" wsClientRecieve.LocalPort = 6677 wsClientRecieve.Bind 6677 Thanks in adv..
I don't know the answer to your problem, however, I always start by asking myself: would I be the only one with such a problem? when not, I try google[^]. There sure are some interesting hits, such as this one[^]. Good hunting! :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.
-
I have an application "app1" which create a UDP socket with port no. 6677.This app broadcast a data packet. I hav another application "app2" which also create UDP socke which always listen 6677.Whenever the data packet comes it do certain operations. Now problem is , when I run these to apps on different machines in the network, app2 detects the data packet.But when I run both the applications on the same machine,app2 never detects the data packet. What may e the problem??? UDP socket related code in app2 is pasted here.... wsClientRecieve.RemotePort = 6677 wsClientRecieve.RemoteHost = "127.0.0.1" wsClientRecieve.LocalPort = 6677 wsClientRecieve.Bind 6677 Thanks in adv..
jainiraj wrote:
two UDP socket on the same machine..
Damn, i thought this was the start of a Joke and was waiting for the punchline. :)
Dave Find Me On: Web|Facebook|Twitter|LinkedIn My Latest Article: ESD System Communication Failure Fail Safe Software Implementation
-
jainiraj wrote:
two UDP socket on the same machine..
Damn, i thought this was the start of a Joke and was waiting for the punchline. :)
Dave Find Me On: Web|Facebook|Twitter|LinkedIn My Latest Article: ESD System Communication Failure Fail Safe Software Implementation
There once were two UDP sockets entering a bar. The bar tender says... I don't know any socket jokes, sorry. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.
-
I have an application "app1" which create a UDP socket with port no. 6677.This app broadcast a data packet. I hav another application "app2" which also create UDP socke which always listen 6677.Whenever the data packet comes it do certain operations. Now problem is , when I run these to apps on different machines in the network, app2 detects the data packet.But when I run both the applications on the same machine,app2 never detects the data packet. What may e the problem??? UDP socket related code in app2 is pasted here.... wsClientRecieve.RemotePort = 6677 wsClientRecieve.RemoteHost = "127.0.0.1" wsClientRecieve.LocalPort = 6677 wsClientRecieve.Bind 6677 Thanks in adv..
Ok, I have done something similar and got it working I "think" the answer is that your localport on the "client" app should be 0 to allow it to use another port to connect from, I use .connect rather than .bind, I don't know enough to say whether this is because I am using vb6 basically only one process can create/bind port 6677 on a given PC and other processes have to connect to it. If you are indeed trying to create the socket in both processes the second create should fail
-
There once were two UDP sockets entering a bar. The bar tender says... I don't know any socket jokes, sorry. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.
-
The first one said: - Hey, man, yesterday I asked Mary to marry me. - And what did she say? - Errr... I don't even know if she was listening... Yep, this is UDP.
That is why SMS is more suited for the occasion I guess. :thumbsup:
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.