28 /** |
28 /** |
29 * Create a new line_proto off the the given sock_stream. The newly allocated line_proto will be returned via *lp_ptr. |
29 * Create a new line_proto off the the given sock_stream. The newly allocated line_proto will be returned via *lp_ptr. |
30 * |
30 * |
31 * The incoming lines are buffered in a buffer of \a buf_size bytes. This imposes a maximum limit on the line length. |
31 * The incoming lines are buffered in a buffer of \a buf_size bytes. This imposes a maximum limit on the line length. |
32 * |
32 * |
|
33 * Note that the given callbacks struct is copied. |
|
34 * |
33 * @param lp_ptr a pointer to the new line_proto will be returned via this pointer |
35 * @param lp_ptr a pointer to the new line_proto will be returned via this pointer |
34 * @param sock the sock_stream to use |
36 * @param sock the sock_stream to use |
35 * @param buf_size the incoming/outgoing buffer size, should be enough to hold the biggest possible line |
37 * @param buf_size the incoming/outgoing buffer size, should be enough to hold the biggest possible line |
36 * @param callbacks the callback struct to use |
38 * @param callbacks the callbacks to use, a copy is stored |
37 * @param cb_arg the read_cb callback argument |
39 * @param cb_arg the read_cb callback argument |
38 * @param err error information is returned via this pointer |
40 * @param err error information is returned via this pointer |
39 */ |
41 */ |
40 err_t line_proto_create (struct line_proto **lp_ptr, struct sock_stream *sock, size_t buf_size, |
42 err_t line_proto_create (struct line_proto **lp_ptr, struct sock_stream *sock, size_t buf_size, |
41 const struct line_proto_callbacks *callbacks, void *cb_arg, struct error_info *err); |
43 const struct line_proto_callbacks *callbacks, void *cb_arg, struct error_info *err); |