mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-23 03:35:30 +00:00
trunk contents moved to root
This commit is contained in:
51
libsrc/jpproxy/src/com/jpexs/proxy/Client.java
Normal file
51
libsrc/jpproxy/src/com/jpexs/proxy/Client.java
Normal file
@@ -0,0 +1,51 @@
|
||||
package com.jpexs.proxy;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.Socket;
|
||||
|
||||
public class Client extends Connection
|
||||
{
|
||||
|
||||
@Override
|
||||
public void promoteToServerSSL() {
|
||||
super.promoteToServerSSL();
|
||||
in = new BufferedInputStream(in);
|
||||
out = new BufferedOutputStream(out);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create a Client from a Socket.
|
||||
*/
|
||||
Client(Socket s) throws IOException
|
||||
{
|
||||
super(s);
|
||||
in = new BufferedInputStream(in);
|
||||
//out = new DebugOutputStream(new BufferedOutputStream(out));
|
||||
out = new BufferedOutputStream(out);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Read a Request.
|
||||
*
|
||||
* @returns a Request.
|
||||
* @see Request
|
||||
*/
|
||||
Request read() throws IOException
|
||||
{
|
||||
Request request = new Request(this);
|
||||
request.read(getInputStream());
|
||||
return request;
|
||||
}
|
||||
|
||||
/**
|
||||
* Write a Reply
|
||||
*
|
||||
* @see Reply
|
||||
*/
|
||||
void write(Reply reply) throws IOException
|
||||
{
|
||||
reply.write(getOutputStream());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user