protected void processSynAckPacket ( Packet packet ) { String serverIp = packet . getSrcIpAddr ( ) ; int serverPort = packet . getSrcPort ( ) ; String clientIp = packet . getDestIpAddr ( ) ; int clientPort = packet . getDestPort ( ) ; String clientId = makeClientId ( clientIp , clientPort ) ; TcpServerScript serverFragmentWriter = scriptFragments . get ( clientId ) ; if ( serverFragmentWriter == null ) { serverFragmentWriter = new TcpServerScript ( emitterFactory . getRptScriptEmitter ( OUTPUT_TYPE , "tcp-server-" + serverIp + "-" + serverPort + "-client-" + clientIp + "-" + clientPort + "-ServerSide" ) ) ; } else if ( serverFragmentWriter . getState ( ) != ScriptState . CLOSED ) { throw new RptScriptsCreatorFailureException ( "Attempting to open already opened tcp connection from server composer:" + clientId ) ; } serverFragmentWriter . writeAccept ( serverIp , serverPort , packet ) ; scriptFragments . put ( clientId , serverFragmentWriter ) ; }
Processes the syn - ack packet which notes the start of tcp conversation