# Class OtpSocketTransport

java.lang.Object
com.ericsson.otp.erlang.OtpSocketTransport

All Implemented Interfaces:
  `OtpTransport`

public class OtpSocketTransport extends Object implements OtpTransport
Default socket-based client transport

## Constructor Summary

Constructors
Constructor
Description
`OtpSocketTransport(String addr, int port)`
`OtpSocketTransport(InetAddress addr, int port)`
`OtpSocketTransport(Socket s)`
Socket wrapping constructor

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`
`InputStream`
`getInputStream()`
`OutputStream`
`getOutputStream()`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### OtpSocketTransport

public OtpSocketTransport(String addr, int port) throws UnknownHostException, IOException

Throws:
  `UnknownHostException`
  `IOException`
See Also:
  - `Socket(String, int)`

### OtpSocketTransport

public OtpSocketTransport(InetAddress addr, int port) throws UnknownHostException, IOException

Throws:
  `UnknownHostException`
  `IOException`
See Also:
  - `Socket(InetAddress, int)`

### OtpSocketTransport

public OtpSocketTransport(Socket s)
Socket wrapping constructor

Parameters:
  `s` - socket to wrap

## Method Details

### getInputStream

public InputStream getInputStream() throws IOException

Specified by:
  `getInputStream` in interface `OtpTransport`
Throws:
  `IOException`
See Also:
  - `Socket.getInputStream()`

### getOutputStream

public OutputStream getOutputStream() throws IOException

Specified by:
  `getOutputStream` in interface `OtpTransport`
Throws:
  `IOException`
See Also:
  - `Socket.getOutputStream()`

### close

public void close() throws IOException

Specified by:
  `close` in interface `OtpTransport`
Throws:
  `IOException`
See Also:
  - `Socket.close()`