Ticket #86 (closed defect: wontfix)

Opened 3 months ago

Last modified 3 months ago

Use on socket connections with non blocking flag set

Reported by: oscar.ostlund@gmail.com Assigned to: xi
Priority: normal Component: libyaml
Severity: normal Keywords:
Cc:

Description

I am trying to use yaml as a communication language between processes that are connected through sockets. When I open sockets, I use non blocking sockets. Thus when libyaml tries to read the file with fread, it returns an error. Indeed, as the non blocking flag is set, when there is nothing more to read, the fread call returns EWOULDBLOCK.

As a hack, I have modified the yaml_file_read_handler function to return 1 if errno == EWOULDBLOCK and !ferror in the other cases...

What do you think ?

Thanks for your help

Oscar

Attachments

Change History

07/29/08 17:34:21 changed by xi

  • status changed from new to closed.
  • resolution set to wontfix.

I think it is better if you define a custom read handler and register it with yaml_parser_set_input(). You may use the code of yaml_file_read_handler() as a start. The standard file read handler is supposed to be used for simple tests and examples. For a networking application, it is better to define a specialized read handler.


Add/Change #86 (Use on socket connections with non blocking flag set)




Change Properties
Action