를 가져옵니다 :나는이 순 TCP 서버가 클라이언트의 IP TCP 그물 노드
private startTCPServer() {
const socket = net.createServer(function(socket_object){
socket_object.on("data", (data) => {
console.log(data);
});
socket_object.on("end", socket_object.end);
socket_object.on("error", (err: any) => {
console.log(err);
});
});
socket.listen(this.TCP_PORT, this.ADDRESS,() => {
console.log('listening...');
});
}
가 어떻게이는 "data"
이벤트에 도달 할 때 주로이 서버에 연결하는 클라이언트의 IP를받을 수 있나요?