# GB.Watch

`void GB.Watch ( int fd , int flag , void * callback, long param )`

Asks the interpreter to watch or to stop watching a specific file descriptor.

- fd is the file descriptor to watch.
- flag is a combination of the following flags that defines the watch action :
  - `GB_WATCH_NONE`, to stop watching.
  - `GB_WATCH_READ`, to watch for reading.
  - `GB_WATCH_WRITE`, to watch for writing.
  - `GB_WATCH_READ_WRITE`, to watch for both reading and writing.
- callback is the address of a function that will be called each time the fd file descriptor fulfils the condition defined by flag.
- param is a long constant passed to the callback.