English 中文(简体)
Socket/Proxy problem in java
原标题:Socket/Proxy problem in java

我有一张与一名代理连接的袖珍,然后与一个遥远的服务器一一一号。 但是,希望从代理机构搬走服务器,有多个链接。 因此,我要向同一代理公司和连接边远服务器的4个袖珍公司制造4个袖珍。

当它做工时,它只是一次与代理人联系。

这里是代号:

static Socket[] liveCon = new Socket[300];
// This is the class that assigns a proxy and connects
// it is a temporary thread that connects and ends.
sockClass sockets = new sockClass; 

class main {
    for (int i = 0; i < livecon.length; i++) {
        sockets[i].start(); // Thread ends after it is connected
    }
}

class sockClass{
   main.liveCon[index] = new Socket(proxy);
   main.liveCon[index].connect(ep);
   main.liveCon[index].setPerformancePreferences(1, 2, 0);
   if (main.liveCon[index].isConnected() == true) {
       myOutput = new PrintStream(main.liveCon[index].getOutputStream());
       main.liveCon[index].setKeepAlive(true);
   }
}
问题回答

象你这样的声音不会使用透镜,而是试图按顺序与代理连接。

由于你没有把问题的样本放在桌面上,很难打断。

想看问题是否出现在你的法典或代理中。

我希望这一帮助。

如果你不使用校对,那么,除非你不打一锁。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签