format proxy code, allow to change swf on the fly

This commit is contained in:
honfika@gmail.com
2014-09-01 16:56:55 +02:00
parent 8325d07b24
commit ed53ba9d0f
37 changed files with 1847 additions and 2267 deletions

View File

@@ -3,40 +3,35 @@ 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);
}
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);
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;
Request read() throws IOException {
Request request = new Request(this);
request.read(getInputStream());
return request;
}
/**
@@ -44,8 +39,7 @@ public class Client extends Connection
*
* @see Reply
*/
void write(Reply reply) throws IOException
{
reply.write(getOutputStream());
void write(Reply reply) throws IOException {
reply.write(getOutputStream());
}
}