#define A_CLSE 0x45534c43
#define A_WRTE 0x45545257
#define A_STAT 0x54415453
+#define A_TCLS 0x534C4354
#define A_ENCR 0x40682018 // encryption 메시지
#ifdef SUPPORT_ENCRYPT
if(write_packet(t->fd, t->serial, &p)) {
put_apacket(p);
E("%s: failed to write SYNC apacket to transport", t->serial);
+ goto oops;
}
+ return 0;
oops:
D("%s: transport output thread is exiting, fd %d, sfd %d\n", t->serial, t->fd, t->sfd);
put_apacket(p);
}
+ D("Input thread out of loop before sending TCLS to server\n");
+ p = get_apacket();
+ p->msg.command = A_TCLS;
+ t->write_to_remote(p, t);
+ D("TCLS sent to server\n");
+ put_apacket(p);
+
// this is necessary to avoid a race condition that occured when a transport closes
// while a client socket is still active.
close_all_sockets(t);