|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdrastic.mCmdIF.VVWNETCMDSENDER
Title: VVWNetCmdSender (low level - use MediaCmdIF instead)
Description: Send VVW MediaCmd s through a network TCP-IP socket interface
to a remote VVW/Titan or network enabled QuickClip. Handles the send and
receive through a direct socket, or through the socket manager.
MediaCmdIF - Main Interface API - uses MediaCmd and VVWNetCmdSender
MediaCmd - Structure sent and returned from the VVW
VVWNETCMDSENDER - used to send and receive the MediaCmds
Company: Drastic Technologies Ltd.
523 The Queensway, Suite 102
Toronto, ON, M8Y 1J7
CANADA
416 255 5636
fax 255 8780
http://www.drastictech.com
engineering@drastictech.com
MediaCmd
,
MediaCmdIF
,
SocketManager
Field Summary | |
long |
dwCmdTimeMs
Millisecond time the last command was sent |
(package private) int |
dwStreamErrors
Total stream errors since connect |
(package private) boolean |
m_bLastCmdOK
If true, then the last command sent was sent are a response was recieved |
private boolean |
m_bValid
If true, then this sender is connected to a vvw and communicating |
private long |
m_Channel
Current channel the net sender is communicating with within the remote vvw |
private boolean |
m_connected
If true, then this sender's tcp/ip socket is connected to the remote machine |
(package private) java.io.DataInputStream |
m_DataInputStream
Input data stream used for communication through socket |
(package private) java.io.DataOutputStream |
m_DataOutputStream
Output data stream used for communication through socket |
(package private) java.util.Date |
m_Date
Current date |
(package private) int |
m_dwPort
Socket port to connect on |
private long |
m_dwSemiUnique
Internal: A unique number to attach to a command |
private static boolean |
m_fInUse_SocketLocket
Only for SocketLocket, do not use outside this function. |
(package private) java.net.InetAddress |
m_inetAddr
InetAddress Class represents the IP address as an unsigned 32 bit number used by the IP |
(package private) java.net.InetSocketAddress |
m_InetSocketAddress
The socket address |
private boolean |
m_NotReady
If True, the sender is not ready to send another command. |
(package private) java.lang.String |
m_szError
Last error message |
private java.net.Socket |
m_TCSocket
Used to connect to a foriegn host at a specified port |
private int |
m_timeOut
Default time out. |
(package private) SocketManager |
socketMgr
Shared socket manager |
Constructor Summary | |
VVWNETCMDSENDER()
VVWNETCMDSENDER - Default, do not use |
|
VVWNETCMDSENDER(SocketManager socketManager)
VVWNETCMDSENDER - Creates sender and keeps reference to socket manager |
Method Summary | |
private int |
BytesAvailable()
BytesAvailable - number of bytes available in the input data stream |
void |
Disconnect(boolean fCloseAllInst)
Disconnects the connection established by socket |
(package private) boolean |
fInUse()
fInUse - Is the socket currently locked and in use |
long |
getChannel()
getChannel |
boolean |
IsConnected()
IsConnected - Are we currently connected through the socket |
boolean |
IsFirstConnect()
IsFirstConnect - Is this the first time we have connected to this machine, or are we going to reuse a currently connected socket. |
boolean |
IsReady()
IsReady - Is our connection ready to receive commands |
boolean |
IsValid()
IsValid - Is our connection currently valid |
(package private) boolean |
LockSocket()
LockSocket - Lock the socket for exclusive use |
boolean |
SendVvwCmd(long lChannel,
MEDIACMD mCmd)
This sends a MediaCmd command to any channel in the VVW we are connected to/ |
boolean |
SendVvwCmd(MEDIACMD mCmd)
Sends a command to the current channel |
void |
setChannel(long channel)
Sets the current channel in use by the applet |
void |
setTimeout(int nTimeout)
setTimeout for the low level socket |
private boolean |
SocketLocket(boolean fCheck,
boolean fLock)
SocketLocket - Lock a socket for exclusive use |
int |
StreamErrors()
StreamErrors - Total stream errors since we first instantiated |
boolean |
TryConnect(java.lang.String szIpAddress,
int dwPort)
Attempts to establish a connection to the specified server at the specified port. |
(package private) boolean |
UnLockSocket()
UnLockSocket - Unlock the socket, allow others access |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public long dwCmdTimeMs
int m_dwPort
java.lang.String m_szError
java.net.InetAddress m_inetAddr
private java.net.Socket m_TCSocket
java.net.InetSocketAddress m_InetSocketAddress
SocketManager socketMgr
java.io.DataInputStream m_DataInputStream
java.io.DataOutputStream m_DataOutputStream
private boolean m_bValid
private boolean m_connected
boolean m_bLastCmdOK
private boolean m_NotReady
int dwStreamErrors
private long m_Channel
private int m_timeOut
private long m_dwSemiUnique
java.util.Date m_Date
private static boolean m_fInUse_SocketLocket
Constructor Detail |
public VVWNETCMDSENDER()
public VVWNETCMDSENDER(SocketManager socketManager)
socketManager
- SocketManager Share socket resource for multiple
logical channels with only one physical pipe (XP socket limit problem)Method Detail |
private boolean SocketLocket(boolean fCheck, boolean fLock)
fCheck
- boolean Do we want to acquire the lock, or just check if it is lockedfLock
- boolean Are we locking, or unlocking the socket
boolean fInUse()
boolean LockSocket()
boolean UnLockSocket()
public void setChannel(long channel)
channel
- longpublic long getChannel()
public void setTimeout(int nTimeout)
nTimeout
- intpublic boolean TryConnect(java.lang.String szIpAddress, int dwPort)
szIpAddress
- String IP address or 'look up-able' namedwPort
- int Normally 1234
public void Disconnect(boolean fCloseAllInst)
fCloseAllInst
- boolean Normally false, just close the instance
the caller opened. If true, the actual socket will close. This will
leave other parts of the program with bad handles to the old socket.private int BytesAvailable()
public boolean SendVvwCmd(long lChannel, MEDIACMD mCmd)
lChannel
- long The target channel 0..nmCmd
- MEDIACMD The MedaiCmd to send
public boolean SendVvwCmd(MEDIACMD mCmd)
mCmd
- MEDIACMD
public boolean IsConnected()
public boolean IsValid()
public boolean IsReady()
public int StreamErrors()
public boolean IsFirstConnect()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |