Class: ServerEngine::WinSock::WSAPROTOCOL_INFO

Inherits:
Object
  • Object
show all
Defined in:
lib/serverengine/winsock.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_bin(bin) ⇒ Object



71
72
73
74
75
# File 'lib/serverengine/winsock.rb', line 71

def self.from_bin(bin)
  proto = malloc
  proto.to_ptr.ref.ptr[0, size] = bin
  proto
end

Instance Method Details

#to_binObject



77
78
79
# File 'lib/serverengine/winsock.rb', line 77

def to_bin
  to_ptr.to_s
end