Tag Archives: tcp

Using SAX (Java) to parse multiple XML messages from a single TCP-stream

Questions: I’m in a position where I use Java to connect to a TCP port and am streamed XML documents one after another, each delimited with the <?xml start of document tag. An example which demonstrates the format: <?xml version=”1.0″?> <person> <name>Fred Bloggs</name> </person> <?xml version=”1.0″?> <person> <name>Peter Jones</name> </person> I’m using the org.xml.sax.* api.… Read More »

Perl web application issue: DBI connect failed: Can't create TCP/IP socket (10106)

Questions: I have issue with my Perl web application, running on Apache 2.2 on Windows 2008r2 with separated MySQL database on CentOS server. Here is the issue: I’m getting timeouts periodically with error: DBI connect(‘host=10.148.xxx.xxx:database=XXX’,’root’,…) failed: Can’t create TCP/IP socket (10106) When I say periodically, that means that most of the time everything works as… Read More »

How's TCP connection established with reverse proxy

Questions: I’ve setup Nginx server to act as a reverse proxy for Apache. Now I’m wondering how TCP connections are established and closed in this workflow. My assumption is that the first TCP connection is established between a browser and Nginx, then Nginx establishes second TCP connection to the Apache. When response from Apache is… Read More »

Using SAX (Java) to parse multiple XML messages from a single TCP-stream

Questions: I’m in a position where I use Java to connect to a TCP port and am streamed XML documents one after another, each delimited with the <?xml start of document tag. An example which demonstrates the format: <?xml version=”1.0″?> <person> <name>Fred Bloggs</name> </person> <?xml version=”1.0″?> <person> <name>Peter Jones</name> </person> I’m using the org.xml.sax.* api.… Read More »

C# Deserializing a struct after receiving it through TCP

Questions: I am sending my own struct “packet” object through the TCP interface that C# offers with TCPListener and TCPClient. This is my struct [Serializable] struct RemuseNetworkPacket { public String ApplicationCode; public String ReceiverCode; public RemusePacketType Type; public uint ID; public uint cID; public String Name; public byte[] Data; public String Text; public System.Drawing.Point Coords;… Read More »

Can nginx do TCP load balance with SSL termination

Questions: Due to some reason, I need to set up nginx tcp load balance, but with ssl termination. I am not sure whether Nginx can do this. Since tcp is layer 4, ssl is layer 5, SSL pass-thru definitely work. But with SSL-termination? Thanks for suggestions. Answers: Nginx can act as L3/4 balancer with stream… Read More »

Connect to SQL Server 2008 with TCP/IP

Questions: I get the following error when I try to connect with TCP/IP from SQL Server Management Studio. I need a step by step description to solve my problem. What’s wrong here? Cannot connect to =================================== A network related or instance specific error when a connection to SQL Server… (provider: Named pipe-provider, error: 40 -… Read More »

Why does TCPDF ignore my inline CSS?

Questions: I am trying to create a PDF file using TCPDF. But When I tried to insert inline CSS into the HTML, it’s displaying a blank page! Here are a few lines of my HTML: pdf->AddPage(); // set font $pdf->SetFont(‘helvetica’, ‘B’, 20); $pdf->Write(0, ‘Example of HTML Justification’, ”, 0, ‘L’, true, 0, false, false, 0);… Read More »

Why does TCPDF ignore my inline CSS?

Questions: I am trying to create a PDF file using TCPDF. But When I tried to insert inline CSS into the HTML, it’s displaying a blank page! Here are a few lines of my HTML: pdf->AddPage(); // set font $pdf->SetFont(‘helvetica’, ‘B’, 20); $pdf->Write(0, ‘Example of HTML Justification’, ”, 0, ‘L’, true, 0, false, false, 0);… Read More »