tcl.lang.channel
Class SocketConnectionEvent

java.lang.Object
  extended by tcl.lang.TclEvent
      extended by tcl.lang.channel.SocketConnectionEvent

public class SocketConnectionEvent
extends TclEvent

A subclass of TclEvent used to indicate that a connection has been made to a server socket.


Constructor Summary
SocketConnectionEvent(Interp interp, TclObject callbackObj, Socket sock, ServerSocket serverSock)
          Create a new event to process a new socket connection
 
Method Summary
 int processEvent(int flags)
          Process the event.
 
Methods inherited from class tcl.lang.TclEvent
sync
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SocketConnectionEvent

public SocketConnectionEvent(Interp interp,
                             TclObject callbackObj,
                             Socket sock,
                             ServerSocket serverSock)
Create a new event to process a new socket connection

Parameters:
interp - The interpreter in which the connection was made
callbackObj - Callback provided to 'socket -server'
sock - The new Java socket that was accepted
serverSock - The Java ServerSocket that created sock
Method Detail

processEvent

public int processEvent(int flags)
Description copied from class: TclEvent
Process the event. Override this method to implement new types of events. Note: this method is called by the primary thread of the notifier.

Specified by:
processEvent in class TclEvent
Parameters:
flags - Miscellaneous flag values: may be any combination of TCL.DONT_WAIT, TCL.WINDOW_EVENTS, TCL.FILE_EVENTS, TCL.TIMER_EVENTS, TCL.IDLE_EVENTS, or others defined by event sources - this is the same as the flags passed to Notifier.doOneEvent()
Returns:
1 means the event has been processed and can be removed from the event queue. 0 means the event should be deferred for processing later.


Copyright © 2015. All rights reserved.