org.jgroups.protocols

Class UDP_NIO.Connector

public static class UDP_NIO.Connector extends Object implements Runnable

Manages a multicast and unicast socket on a given interface (NIC). The multicast socket is used to listen for incoming multicast packets, the unicast socket is used to (1) listen for incoming unicast packets, (2) to send unicast packets and (3) to send multicast packets
Field Summary
protected byte[]receive_buffer
Buffer for incoming unicast packets
protected UDP_NIO.Connector.SenderThreadsender_thread
protected Threadt
Constructor Summary
Connector(NetworkInterface bind_interface, int local_bind_port, int port_range, int receive_buffer_size, int receive_sock_buf_size, int send_sock_buf_size, int ip_ttl, Receiver receiver)
Method Summary
NetworkInterfacegetBindInterface()
SocketAddressgetLocalAddress()
voidrun()
voidsend(DatagramPacket packet)
Sends a message using mcast_sock
voidstart()
voidstop()
Stops the connector.
StringtoString()

Field Detail

receive_buffer

protected byte[] receive_buffer
Buffer for incoming unicast packets

sender_thread

protected UDP_NIO.Connector.SenderThread sender_thread

t

protected Thread t

Constructor Detail

Connector

public Connector(NetworkInterface bind_interface, int local_bind_port, int port_range, int receive_buffer_size, int receive_sock_buf_size, int send_sock_buf_size, int ip_ttl, Receiver receiver)

Method Detail

getBindInterface

public NetworkInterface getBindInterface()

getLocalAddress

public SocketAddress getLocalAddress()

run

public void run()

send

public void send(DatagramPacket packet)
Sends a message using mcast_sock

start

public void start()

stop

public void stop()
Stops the connector. After this call, start() cannot be called, but a new connector has to be created

toString

public String toString()
Copyright ? 1998-2005 Bela Ban. All Rights Reserved.