Patent ID: 8332532

Claim:
A method for establishing a TCP connection between a first client terminal and a second client terminal, said first client terminal being protected by a first stateful firewall and said second client terminal being protected by a second stateful firewall, and both client terminals comprising means for sending messages to each other via a messaging server; the method comprising: agreeing on establishing a TCP connection between the client terminals by sending a message from the first client terminal to the second client terminal via the messaging server using a first communication connection, said message comprising at least port numbers of the client terminals to be used on said connection; starting a TCP connection establishment procedure via a second communication connection in both client terminals; in response to sending a first handshake message of the TCP connection establishment procedure, sending a message indicating a sequence number of the first handshake message from both client terminals to the opposite client terminal via the messaging server using the first communication connection; in response to the firewalls of the opposite client terminals rejecting the first handshake message, creating an acknowledgement message to said first handshake message in both client terminals using a raw socket, the acknowledgement message including the received sequence number as an acknowledgement number; and sending the raw socket based acknowledgement message to the opposite client terminal via the second communication connection for a further acknowledgement according to the TCP connection establishment procedure, said acknowledgement completing the establishment of the TCP connection.