1
ocaml에서 메시지를 보내는 코드를 작성했습니다.[close_out out_channel]을 (를) 왜 제거해야하나요?
let out_channel = Unix.out_channel_of_descr sockfd in
Marshal.to_channel out_channel message [];
flush out_channel;
close_out out_channel
그러나 경고를 받았습니다.
GLib-WARNING **: poll(2) failed due to: Bad file descriptor.
나는 경고가 [close_out out_channel]에 의한 알고 있었다, 나는 코드에서 [out_channel close_out] 제거 할 때 경고를하지 않았다. 왜 내가 [close_out out_channel]을 제거해야하는지 모르겠다. 이유를 말해 줄 수 있니?
그럼, 잘못된 코드로 out_channel을 닫을 때 socked를 종료한다는 의미입니까? – mmsss
네, 제가 그렇게 명확하지 않다고 생각합니다. 나는 약간을 다시 쓸 것이다. –
감사합니다. 나는 너의 대답을 기다리고있을 것이다. – mmsss