Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^4: help me on socket programming

by bh_perl (Monk)
on Jul 12, 2013 at 09:24 UTC ( [id://1043919]=note: print w/replies, xml ) Need Help??


in reply to Re^3: help me on socket programming
in thread help me on socket programming

hi...

I have tried run the command as below and its look hang.

>telnet 19.25.15.15 1998 Trying... Connected to 19.25.15.15. Escape character is '^]'.

I think this is the system scenario to do the data collection

1. Sent request to the remote server with specific address.

2. Remote server acknowledge with some info.

3. Collect available data based on the information and save into temporary file.

4. End connection

Replies are listed 'Best First'.
Re^5: help me on socket programming
by Utilitarian (Vicar) on Jul 12, 2013 at 11:23 UTC
    There does not appear to be a stream of data to read coming from that port when you connected, usually you have to send a request in these circumstances and the response is then sent and the socket is closed by the remote host or an agreed end of data signal flag is sent (usually "OK" or ("NO"|"KO")) to indicate the end of the data stream.

    In this case you should perhaps print your request to the socket and process the data stream until end of data or end of response token.

    print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1043919]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-04-23 20:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found