Re: [twsocket] TWSocket strange problem
Hi, If I am not mistaken this link complains about a similar problem: http://lists.elists.org/pipermail/twsocket/2012-February/044550.html See this: // Here! Kludge. { For some reason, despite the Addr/Port/Proto assignments being valid, the F*Assigned (e.g. - FPortAssigned) values are FALSE. There is a bug somewhere that we should fix, but for now we are redoing the assignments simply to get those flags set to TRUE. } WSocket.Addr := WSocket.Addr; WSocket.Port := WSocket.Port; WSocket.Proto := WSocket.Proto; // Re-connect. Its about in the middle of the page. Thanks, Noam. -Original Message- From: TWSocket on behalf of François Piette Sent: Tue 1/28/2014 11:00 PM To: 'ICS support mailing' Subject: Re: [twsocket] TWSocket strange problem > I may have a problem in my code but this is a bit strange ? Have you tested with one of the supplied samples ? -- francois.pie...@overbyte.be Embarcadero MVP http://www.overbyte.be http://francois-piette.blogspot.com -- 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 This footnote confirms that this email message has been scanned by PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses. This footnote confirms that this email message has been scanned by PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses. -- 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
Re: [twsocket] TWSocket strange problem
Hi, Yes I run a few examples before using the components. My current application has actually a few sockets. I have a ping component checking if devices are online/offline. This is in its own thread. I have two sockets one for sending and one for receiving working in a separate module with their own thread. The socket that I have problems with is running in a separate thread I added a testing code after assigning the Port and Addr, Something like this: if((Socket->Addr == NULL) || (Socket->Port == 0)) { And that was before even calling Connect... Once in a few run's I got one of the above 0 or even both ? I am sure that I am writing the port and IP values. BR, noam. -Original Message- From: TWSocket on behalf of François Piette Sent: Tue 1/28/2014 11:00 PM To: 'ICS support mailing' Subject: Re: [twsocket] TWSocket strange problem > I may have a problem in my code but this is a bit strange ? Have you tested with one of the supplied samples ? -- francois.pie...@overbyte.be Embarcadero MVP http://www.overbyte.be http://francois-piette.blogspot.com -- 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 This footnote confirms that this email message has been scanned by PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses. This footnote confirms that this email message has been scanned by PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses. -- 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
Re: [twsocket] TWSocket strange problem
> I may have a problem in my code but this is a bit strange ? Have you tested with one of the supplied samples ? -- francois.pie...@overbyte.be Embarcadero MVP http://www.overbyte.be http://francois-piette.blogspot.com -- 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
Re: [twsocket] TWSocket strange problem
Hi, Thanks for the fast response. I have triad that but it did not solve the problem. As you can see what I did is catched the exception and triad again. The problem I am facing is that after assigning Addr and Port I see that Addr == NULL and sometimes even Port == 0 I may have a problem in my code but this is a bit strange ? BR, Noam. -Original Message- From: TWSocket on behalf of François Piette Sent: Tue 1/28/2014 7:35 PM To: 'ICS support mailing' Subject: Re: [twsocket] TWSocket strange problem >Everything works just fine except that once in a few restarts to my application I get an exception >that IP address is not defined. My IP is defined and has no problems that I can see ? Try assigning IP, Port and Proto each time before calling connect. -- francois.pie...@overbyte.be Embarcadero MVP http://www.overbyte.be http://francois-piette.blogspot.com -- 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 This footnote confirms that this email message has been scanned by PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses. This footnote confirms that this email message has been scanned by PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses. -- 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
Re: [twsocket] TWSocket strange problem
>Everything works just fine except that once in a few restarts to my application I get an exception >that IP address is not defined. My IP is defined and has no problems that I can see ? Try assigning IP, Port and Proto each time before calling connect. -- francois.pie...@overbyte.be Embarcadero MVP http://www.overbyte.be http://francois-piette.blogspot.com -- 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
[twsocket] TWSocket strange problem
Hi, First of all let me say a great thank you for a great TCP/IP components set. I have a strange problem. I have a thread that has one TWSocket and a TStack. The socket is tcp and used as a client. I add messages to this Stack from another thread. In the thread that uses the TWSocket I read one item at a time from the stack. The item has a string and a destination IP. Every time I read one item from the stack I check that my socket is closed, connect to the IP in the message and wait for the SocketSessionConnected event. When the SocketSessionConnected is triggered I send the data and call CloseDelayed function Everything works just fine except that once in a few restarts to my application I get an exception that IP address is not defined. My IP is defined and has no problems that I can see ? What am I doing wrong or is there a bug in TWSocket ? I have attached the code I am using. Any assistance will be appreciated. BR, Noam. This footnote confirms that this email message has been scanned by PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses. -- 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