| 372 | } |
| 373 | |
| 374 | void NetInterface::sendConnectReject(NetConnection *conn, const char *reason) |
| 375 | { |
| 376 | if(!reason) |
| 377 | return; // if the stream is NULL, we reject silently |
| 378 | |
| 379 | BitStream *out = BitStream::getPacketStream(); |
| 380 | out->write(U8(ConnectReject)); |
| 381 | out->write(conn->getSequence()); |
| 382 | out->writeString(reason); |
| 383 | BitStream::sendPacketStream(conn->getNetAddress()); |
| 384 | } |
| 385 | |
| 386 | void NetInterface::handleConnectReject(const NetAddress *address, BitStream *stream) |
| 387 | { |
nothing calls this directly
no test coverage detected