PHP Classes

Why don't you add a socket_close after socket_write?

Recommend this page to a friend!

      Socket Server  >  All threads  >  Why don't you add a socket_close...  >  (Un) Subscribe thread alerts  
Subject:Why don't you add a socket_close...
Summary:need a socket_close after socket_write
Messages:2
Author:Andy.L
Date:2009-10-26 02:49:53
Update:2009-10-26 17:23:34
 

  1. Why don't you add a socket_close...   Reply   Report abuse  
Picture of Andy.L Andy.L - 2009-10-26 02:49:53
Following is my case:
1) A POS client send a ISO8583 message to my server
2) Server get the message then parse it
3) Send a message back to the POS client
My problem is:
Client send message to server, there is no message send back. If I stop the script at server side, client got the message.
My question:
Why don't you add a socket_close after socket_write after we get the response?

  2. Re: Why don't you add a socket_close...   Reply   Report abuse  
Picture of Aleksey V. Zapparov Aleksey V. Zapparov - 2009-10-26 17:23:35 - In reply to message 1 from Andy.L
Hello.

In fact I'm not clearly understand the problem. Please can you describe all process in details? Also if it's possible can you give me sources (or binaries) of the client so I could see what's going on.

Sometimes it's not needed to autoclose connection, e.g. SMTP server. But anyway I'll add setAutoClose($true_or_false) method, so socket_close() will be called after socket_write() on true.

Sincerely yours, Aleksey.

 
For more information send a message to info at phpclasses dot org.