Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.minecraft.src
Class TcpConnection

    java.lang.Object
      net.minecraft.src.TcpConnection

All Implemented Interfaces:
  NetworkManager

    public class TcpConnection

extends Object
implements NetworkManager

Field Summary
`static int[]` | `field_74467_d`
`int` | `field_74468_e`
`static AtomicInteger` | `field_74469_b`
`static int[]` | `field_74470_c`
`static AtomicInteger` | `field_74471_a`

Constructor Summary
`TcpConnection(Socket par1Socket, String par2Str, NetHandler par3NetHandler)`
`TcpConnection(Socket par1Socket, String par2Str, NetHandler par3NetHandler, PrivateKey par4PrivateKey)`

Method Summary
`void` | `addToSendQueue(Packet par1Packet)` Adds the packet to the correct send queue (chunk data packets go to a separate queue).
`void` | `closeConnections()`
`Socket` | `getSocket()`
`SocketAddress` | `getSocketAddress()` Return the InetSocketAddress of the remote endpoint
`void` | `networkShutdown(String par1Str, Object... par2ArrayOfObj)` Shuts down the network with the specified reason.
`int` | `packetSize()` returns 0 for memoryConnections
`void` | `processReadPackets()` Checks timeouts and processes all pending read packets.
`void` | `serverShutdown()` Shuts down the server.
`void` | `setNetHandler(NetHandler par1NetHandler)` Sets the NetHandler for this NetworkManager.
`void` | `wakeThreads()` Wakes reader and writer threads

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### field_74471_a

    public static AtomicInteger field_74471_a

### field_74469_b

    public static AtomicInteger field_74469_b

### field_74470_c

    public static int[] field_74470_c

### field_74467_d

    public static int[] field_74467_d

### field_74468_e

    public int field_74468_e

Constructor Detail

### TcpConnection

    public TcpConnection(Socket par1Socket,
                         String par2Str,
                         NetHandler par3NetHandler)
                  throws IOException

Throws:
  `IOException`

### TcpConnection

    public TcpConnection(Socket par1Socket,
                         String par2Str,
                         NetHandler par3NetHandler,
                         PrivateKey par4PrivateKey)
                  throws IOException

Throws:
  `IOException`

Method Detail

### closeConnections

    public void closeConnections()

  Specified by:
    `closeConnections` in interface `NetworkManager`

### setNetHandler

    public void setNetHandler(NetHandler par1NetHandler)

  Sets the NetHandler for this NetworkManager. Server-only.

  Specified by:
    `setNetHandler` in interface `NetworkManager`

### addToSendQueue

    public void addToSendQueue(Packet par1Packet)

  Adds the packet to the correct send queue (chunk data packets go to a separate queue).

  Specified by:
    `addToSendQueue` in interface `NetworkManager`

### wakeThreads

    public void wakeThreads()

  Wakes reader and writer threads

  Specified by:
    `wakeThreads` in interface `NetworkManager`

### networkShutdown

    public void networkShutdown(String par1Str,
                                Object... par2ArrayOfObj)

  Shuts down the network with the specified reason. Closes all streams and sockets, spawns NetworkMasterThread to stop reading and writing threads.

  Specified by:
    `networkShutdown` in interface `NetworkManager`

### processReadPackets

    public void processReadPackets()

  Checks timeouts and processes all pending read packets.

  Specified by:
    `processReadPackets` in interface `NetworkManager`

### getSocketAddress

    public SocketAddress getSocketAddress()

  Return the InetSocketAddress of the remote endpoint

  Specified by:
    `getSocketAddress` in interface `NetworkManager`

### serverShutdown

    public void serverShutdown()

  Shuts down the server. (Only actually used on the server)

  Specified by:
    `serverShutdown` in interface `NetworkManager`

### packetSize

    public int packetSize()

  returns 0 for memoryConnections

  Specified by:
    `packetSize` in interface `NetworkManager`

### getSocket

    public Socket getSocket()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD