Changes between Version 48 and Version 49 of Dev


Ignore:
Timestamp:
Dec 16, 2013 5:19:24 PM (10 years ago)
Author:
mitty
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Dev

    v48 v49  
    101101 > shutdown で書き込み側だけハーフクローズするとよい。 
    102102 > 相手側がcloseしてから、こちらをcloseする。相手側がcloseしたことは、readを呼んでブロックさせておくと、読み込みバイト数==0 つまりEOFになったことでわかる。 
     103 
     104 * [http://stackoverflow.com/questions/14028401/how-to-use-epoll-with-data-ptr-instead-of-data-fd how to use epoll with data->ptr, instead of data.fd? - Stack Overflow] 
     105 > You can put whatever you want in data. It's not used by epoll itself, it just returns it when the event occurs on the fd specified in the argument list. 
     106  * epoll_event構造体は以下のように定義されていた 
     107  > {{{#!c 
     108  > typedef union epoll_data { 
     109  >     void        *ptr; 
     110  >     int          fd; 
     111  >     uint32_t     u32; 
     112  >     uint64_t     u64; 
     113  > } epoll_data_t; 
     114  >  
     115  > struct epoll_event { 
     116  >     uint32_t     events;      /* epoll イベント */ 
     117  >     epoll_data_t data;        /* ユーザデータ変数 */ 
     118  > }; 
     119  > }}}