Loading tnl2/event_connection.h +2 −1 Original line number Diff line number Diff line Loading @@ -309,8 +309,9 @@ public: //int32 start = bstream.get_bit_position(); uint32 rpc_index = bstream.read_integer(_rpc_id_bit_size); fflush(stdout); // FIXME if(rpc_index >= _rpc_count) assert(0); //throw tnl_exception_invalid_packet; assert(0); // FIXME: throw tnl_exception_invalid_packet; rpc_record &the_rpc = rpc_methods[rpc_index]; Loading tnl2/net_connection.h +3 −1 Original line number Diff line number Diff line Loading @@ -204,6 +204,7 @@ public: write_packet(stream, note); TorqueLogMessageFormatted(LogNetConnection, ("connection %d: END - %llu bits", _connection, stream.get_bit_position() - start) ); logprintf("NC packet write data: %s", buffer_encode_base_16(stream.get_buffer(), stream.get_next_byte_position())->get_buffer()); _interface->get_socket().send_to_connection(_connection, stream, &_last_send_sequence); //torque_connection_send_to(_connection, stream.get_next_byte_position(), stream.get_buffer(), &_last_send_sequence); Loading @@ -215,6 +216,7 @@ public: read_packet_rate_info(data); _last_received_send_delay = time((data.read_integer(8) << 3) + 4); _last_packet_recv_time = _interface->get_process_start_time(); logprintf("NC packet read data: %s", buffer_encode_base_16(data.get_buffer(), data.get_next_byte_position())->get_buffer()); read_packet(data); } Loading tnl2/net_interface.h +3 −1 Original line number Diff line number Diff line Loading @@ -185,12 +185,13 @@ public: bit_stream challenge_response(event->data, event->data_size); byte_buffer_ptr public_key = new byte_buffer(event->public_key, event->public_key_size); connection_pointer p = _connection_table.find(event->connection); ref_ptr<net_connection> *the_connection = p.value(); logprintf("Got a challenge response -- %d", bool(p)); if(the_connection) { (*the_connection)->set_connection_state(net_connection::state_requesting_connection); (*the_connection)->on_challenge_response(challenge_response, public_key); _socket.accept_connection_challenge(event->connection); } } Loading Loading @@ -328,6 +329,7 @@ public: the_connection->write_connect_request(connect_stream); torque_connection_id connection_id = _socket.connect(remote_host, connect_stream.get_buffer(), connect_stream.get_next_byte_position()); logprintf("opened connection id = %d", connection_id); _add_connection(the_connection, connection_id); //torque_socket_connect(_socket, connect_address, connect_stream.get_next_byte_position(), connect_buffer); //the_connection->set_torque_connection(connection_id); Loading Loading
tnl2/event_connection.h +2 −1 Original line number Diff line number Diff line Loading @@ -309,8 +309,9 @@ public: //int32 start = bstream.get_bit_position(); uint32 rpc_index = bstream.read_integer(_rpc_id_bit_size); fflush(stdout); // FIXME if(rpc_index >= _rpc_count) assert(0); //throw tnl_exception_invalid_packet; assert(0); // FIXME: throw tnl_exception_invalid_packet; rpc_record &the_rpc = rpc_methods[rpc_index]; Loading
tnl2/net_connection.h +3 −1 Original line number Diff line number Diff line Loading @@ -204,6 +204,7 @@ public: write_packet(stream, note); TorqueLogMessageFormatted(LogNetConnection, ("connection %d: END - %llu bits", _connection, stream.get_bit_position() - start) ); logprintf("NC packet write data: %s", buffer_encode_base_16(stream.get_buffer(), stream.get_next_byte_position())->get_buffer()); _interface->get_socket().send_to_connection(_connection, stream, &_last_send_sequence); //torque_connection_send_to(_connection, stream.get_next_byte_position(), stream.get_buffer(), &_last_send_sequence); Loading @@ -215,6 +216,7 @@ public: read_packet_rate_info(data); _last_received_send_delay = time((data.read_integer(8) << 3) + 4); _last_packet_recv_time = _interface->get_process_start_time(); logprintf("NC packet read data: %s", buffer_encode_base_16(data.get_buffer(), data.get_next_byte_position())->get_buffer()); read_packet(data); } Loading
tnl2/net_interface.h +3 −1 Original line number Diff line number Diff line Loading @@ -185,12 +185,13 @@ public: bit_stream challenge_response(event->data, event->data_size); byte_buffer_ptr public_key = new byte_buffer(event->public_key, event->public_key_size); connection_pointer p = _connection_table.find(event->connection); ref_ptr<net_connection> *the_connection = p.value(); logprintf("Got a challenge response -- %d", bool(p)); if(the_connection) { (*the_connection)->set_connection_state(net_connection::state_requesting_connection); (*the_connection)->on_challenge_response(challenge_response, public_key); _socket.accept_connection_challenge(event->connection); } } Loading Loading @@ -328,6 +329,7 @@ public: the_connection->write_connect_request(connect_stream); torque_connection_id connection_id = _socket.connect(remote_host, connect_stream.get_buffer(), connect_stream.get_next_byte_position()); logprintf("opened connection id = %d", connection_id); _add_connection(the_connection, connection_id); //torque_socket_connect(_socket, connect_address, connect_stream.get_next_byte_position(), connect_buffer); //the_connection->set_torque_connection(connection_id); Loading