Class: WEBSocket::AcceptedSocket

Inherits:
Base::AcceptedSocket
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/WEBSocket/Standard/acceptedSocket.rb,
lib/WEBSocket/Celluloid/acceptedSocket.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(socket) ⇒ AcceptedSocket

Returns a new instance of AcceptedSocket.



9
10
11
12
# File 'lib/WEBSocket/Standard/acceptedSocket.rb', line 9

def initialize socket
  @socket = socket
  @status = :disconnected
end

Instance Attribute Details

#statusObject (readonly)

Returns the value of attribute status.



4
5
6
# File 'lib/WEBSocket/Standard/acceptedSocket.rb', line 4

def status
  @status
end

Instance Method Details

#acquire_ownership(type) ⇒ Object



9
10
11
# File 'lib/WEBSocket/Celluloid/acceptedSocket.rb', line 9

def acquire_ownership type
  @socket.acquire_ownership type
end

#evented?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/WEBSocket/Celluloid/acceptedSocket.rb', line 13

def evented?
  @socket.evented?
end

#release_ownership(type) ⇒ Object



22
23
24
# File 'lib/WEBSocket/Celluloid/acceptedSocket.rb', line 22

def release_ownership type
  @socket.release_ownership type
end

#wait_readableObject



26
27
28
# File 'lib/WEBSocket/Celluloid/acceptedSocket.rb', line 26

def wait_readable
  @socket.wait_readable
end

#wait_writableObject



30
31
32
# File 'lib/WEBSocket/Celluloid/acceptedSocket.rb', line 30

def wait_writable
  @socket.wait_writable
end