ruby socket issue -


I'm still a type of newbie for Ruby, but I used to use Ruby Sockets because I The 'socket' sometimes class, and so I have full control over my chairs and their options.

This is the thing I am trying to make it a little easier for me, so I'm trying to use the 'TCSPSAT' class, the witch (I think) as the 'socket' class Does not give much control

My script looks like this:

  requires 'socket' client = TCPSocket.open ('5.5.5.5', '5555') client.send ("Msg", 0) # 0 means the standard packet client.close  

is the question, suppose that instead of '0' on the transmission line ?? And if '0' is the standard packet, then none other than the standard can exist, does it have some control over the TCP packet ?? If so, instead of hand writing the entire socket using the 'socket' class, it would be very easy for me.

send is the second parameter flag parameter. It passes on the send system call, usually you want to leave it on 0.

On the man page, according to the man page, there are other possible flags:

  #define MSG_OOB 0x1 / * Process Out-of-Band Data * / #define MSG_DONTROUTE 0x4 / * Bypass routing, use the Direct Interface * /  

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -