in your code, the stream tls.connect returned is a Duplex. When your callback on tls.connect is called, the stream is ready for communication. I asume that with "normal request/response" you do mean like HTTP works. in this case
open a connection, send your xml in the callback via .write(), .end() and then receive the response with 'readable' + .read(), close the connection then. if the one-connection-per-request doesn't fit your requirements and you want to use a single connection for multiple requests, than you have to send a request after you got a response and then wait for the next response. Am Montag, 2. September 2013 23:32:40 UTC+2 schrieb Martin Lundberg: > > I'm connecting to an EPP server using the tls module. I've managed to > connect to the server and get what it sends back using the 'readable' event > and the read() method. What I don't get is how to do a normal > request/response command. I need to be able to build up an xml string, send > it to the server and get back the response. How am I supposed to do this? > > The code which with I've been able to connect to the server: > https://gist.github.com/marlun/6417445 sure it connects but I can't > actually use it to make a request <--> response. > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
