Hi All,

I have been looking in the TWsocket sourcecode, and found the following
'probable' solution for my issue, however it is a lot of work to recode my
software, so can anyone confirm if this is a working solution?

Set the Wsocket to listen, and use Wsocket.sendto command to send data. In
this way the Wsocket.port is the port to listen oin, and with Wsocket.sendto
I define the remote-applications port?

My code is all based on a normal string. Is it possible to use a standard
string in the Wsocket.sendto command?

Best regards,

Ruud Kerstens

-----Oorspronkelijk bericht-----
Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] Namens
Ruud Kerstens
Verzonden: donderdag 10 november 2011 14:10
Aan: 'ICS support mailing'
Onderwerp: [twsocket] Socket connections like UDP-send-demo

Hi All,

 

 

I am currently trying to figure out an issue I have with the UDPsend demo.

I added the UDP-listen options in there, however, if I send a message, I get
a response back from the udp-server. As soon as I send the message, I use:
Wsocket.connect like in the demo.

Now the Wsocket does not receive the reply, so I even tested to use the
ondata-availlable to check if I receive any data. No data received, however
in wireshark I do see the data send back to the address assigned to
Wsocket.localport. 

 

The only way I get this working sofar is by using a separate Socket, and use
that ondata-availlable event from that socket to receive the data send back.
The disadvantage is now that this second TWEsocket cannot have the port
assigned to listen to, which was used to send the data from.

 

Actually I need to use Socket1.localport as Socket2.port to get it working,
but cannot be set at the same time.

 

Any good idea on how to fix this?

 

So the questions are:

-          Can I use a TWsocket for send and receive in UDP?

-          If Not, how Can I have Wsocket1.localport value be used in
Wsocket2.port (so this can handle the receiced data) without having
conflicts or errors?

 

 

Best regards,

 

Ruud Kerstens

--
To unsubscribe or change your settings for TWSocket mailing list please goto
http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to