send

basicsocket.send(mesg, flags [, dest_sockaddr]) => numbytes_sent
Instance Public methods

send mesg via basicsocket.

mesg should be a string.

flags should be a bitwise OR of Socket::MSG_* constants.

dest_sockaddr should be a packed sockaddr string or an addrinfo.

TCPSocket.open("localhost", 80) {|s|
  s.send "GET / HTTP/1.0\r\n\r\n", 0
  p s.read
}
doc_ruby_on_rails
2015-03-31 01:31:38
Comments
Leave a Comment

Please login to continue.