getGreetingPacket() public method

public getGreetingPacket ( ) : byte[]
return byte[]
Example #1
0
        }               // start()

        /**
         * handles the send of the greeting packet if not send already
         *
         */
        private void handleNotConnected(Mysql x, NetworkStream ns, TcpClient client)
        {
            byte[] dataOut = x.getGreetingPacket(0);
            if (dataOut != null)
            {
                m_state = State.GREETING_PACKET_SEND;
                ns.Write(dataOut, 0, dataOut.Length);
                ns.Flush();
                ns = client.GetStream();

                Console.WriteLine("Info: Send greeting packet....");
            }
            else
            {
                Console.WriteLine("Info: Error retrieving greeting packet....");
            }
        } // handleNotConnected
Example #2
0
        /**
         * handles the send of the greeting packet if not send already
         *
         */
        private void handleNotConnected(Mysql x, NetworkStream ns, TcpClient client)
        {
            byte[] dataOut = x.getGreetingPacket (0);
            if (dataOut != null)
            {
                m_state = State.GREETING_PACKET_SEND;
                ns.Write (dataOut, 0, dataOut.Length);
                ns.Flush ();
                ns = client.GetStream();

                Console.WriteLine("Info: Send greeting packet....");

            }
            else
            {
                Console.WriteLine("Info: Error retrieving greeting packet....");
            }
        }