Method: Cyc::Connection::SocketDriver#write
- Defined in:
- lib/cyc/connection/socket.rb
#write(rawmsg) ⇒ Object
Send a message to the server.
52 53 54 55 56 57 58 59 60 61 |
# File 'lib/cyc/connection/socket.rb', line 52 def write(rawmsg) @last_message = rawmsg @sock.write(rawmsg + EOL) # ensure that the connection is still with a server # and wait for an answer at the same time if @sock.eof? disconnect raise Errno::ECONNRESET end end |