I am trying to build an HTTP request to be sent via a proxy that accepts a proxy header. I am trying to find a way to set that, but couldn’t see it. Below is the curl command which I need to convert to the Java code. curl -i -u user:pwd -k GET –http1.1 –proxy-insecure https://localhost:8443 –proxy-header “X-Connect-Client-Id: abcde” https://target_host/api
Tag: network-programming
Apache Telnet Client does not recevie non-ASCII characters
I’ve been trying to useorg.apache.commons.net.telnet.TelnetClient and I am having trouble to receive non-ASCII characters (in my case polish chars like ą,ę,ć,ź and few others). The problem is not on server side – when I use default Ubuntu telnet implementation or Putty I have no problem receiving non-ASCII characters. My code looks something like this (simplified a bit for readability): I
Should i use the same port numbers when sending data through UDP?
When we send data (in this case) to a client/server, does this really matter to use the same port number? My guess is no, because it doesn’t matter which port you are using when sending data to. (The protocol gives it to you randomly internally – this is the idea?) The only thing has to be kept, the port has
Netty vs Apache MINA
They both provide roughly the same functionality. Which one should I choose to develop my high-performance TCP server? What are the pros & cons? Reference links: Apache MINA (source) Netty (source) Answer While MINA and Netty have similar ambitions, they are quite different in practice and you should consider your choice carefully. We were lucky in that we had lots