Version 0.1 of the tipcsocket Ruby library has been released. This
library provides access to TIPC sockets using the standard Ruby socket
interface.
Get tipcsocket from RubyForge:
$ gem install tipcsocket
Server Example:
require 'rubygems'
require 'tipcsocket'
include TIPCSocket::Constants
server_addr = TIPCNameSeq.new(18888, 17, 17, TIPC_ZONE_SCOPE)
s = TIPCSocket.new(:rdm)
s.bind(server_addr)
data, client = s.recvfrom(65535)
client = TIPCSocket.unpack_sockaddr(client)
p client
puts "server: message received: #{data}"
s.send("hello client!", 0, client)
s.close
Client Example:
require 'rubygems'
require 'tipcsocket'
include TIPCSocket::Constants
server_addr = TIPCName.new(18888, 17, TIPC_NODE_SCOPE)
s = TIPCSocket.new(:rdm)
s.send("hello server!", 0, server_addr)
msg = s.recv(65535)
puts "client: received response: #{msg}"
s.close
The project page is available here: http://rubyforge.org/projects/tipcsocket
Documentation can be found here: http://tipcsocket.rubyforge.org/
Corey
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
tipc-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tipc-discussion