MCPcopy Create free account
hub / github.com/catabriga/graphwar / Connection

Method Connection

src/GraphServer/Connection.java:37–51  ·  view source on GitHub ↗
(String ip, int port)

Source from the content-addressed store, hash-verified

35 private long lastSentTime;
36
37 public Connection(String ip, int port) throws IOException
38 {
39 SocketAddress sockaddr = new InetSocketAddress(ip, port);
40 socket = new Socket();
41
42 socket.connect(sockaddr, Constants.TIMEOUT_CONNECTING);
43
44 socket.setSoTimeout(Constants.TIMEOUT_KEEPALIVE);
45 out = new PrintWriter(socket.getOutputStream(), true);
46 in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
47
48 lastReceivedTime = System.currentTimeMillis();
49 lastSentTime = System.currentTimeMillis();
50
51 }
52
53 public Connection(Socket socket) throws IOException
54 {

Callers

nothing calls this directly

Calls 1

connectMethod · 0.80

Tested by

no test coverage detected