# FixIO Documentation

Back to summary

`import "io/tcp";`

## TCPConnection class

TCP connection.

Inherits from Stream.

### Functions

`static function open(hostname: String, port: Integer): TCPConnection`
  Opens a TCP/IP connection to given host and port.
`function read_part(buf: Byte[], off: Integer, len: Integer, timeout: Integer): Integer
function write_part(buf: Byte[], off: Integer, len: Integer, timeout: Integer): Integer
`
  Variants of `read_part` and `write_part` functions with a timeout: negative value means infinite waiting (the default) and zero means no blocking. The timeout is in milliseconds.