tcl.lang.channel
Class SocketConnectionEvent
java.lang.Object
tcl.lang.TclEvent
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.
Method Summary |
int |
processEvent(int flags)
Process the event. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 madecallbackObj
- Callback provided to 'socket -server'sock
- The new Java socket that was acceptedserverSock
- The Java ServerSocket that created sock
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.