author | Tero Marttila <terom@fixme.fi> |
Tue, 28 Apr 2009 20:27:45 +0300 | |
branch | new-transport |
changeset 155 | c59d3eaff0fb |
child 169 | e6a1ce44aecc |
permissions | -rw-r--r-- |
155
c59d3eaff0fb
most of the new transport/sock code compiles, but things are still missing
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
1 |
#ifndef SOCK_TCP_H |
c59d3eaff0fb
most of the new transport/sock code compiles, but things are still missing
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
2 |
#define SOCK_TCP_H |
c59d3eaff0fb
most of the new transport/sock code compiles, but things are still missing
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
3 |
|
c59d3eaff0fb
most of the new transport/sock code compiles, but things are still missing
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
4 |
/** |
c59d3eaff0fb
most of the new transport/sock code compiles, but things are still missing
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
5 |
* @file |
c59d3eaff0fb
most of the new transport/sock code compiles, but things are still missing
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
6 |
* |
c59d3eaff0fb
most of the new transport/sock code compiles, but things are still missing
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
7 |
* TCP transport implementation. |
c59d3eaff0fb
most of the new transport/sock code compiles, but things are still missing
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
8 |
* |
c59d3eaff0fb
most of the new transport/sock code compiles, but things are still missing
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
9 |
* XXX: provide some TCP-specific type/functions? |
c59d3eaff0fb
most of the new transport/sock code compiles, but things are still missing
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
10 |
*/ |
c59d3eaff0fb
most of the new transport/sock code compiles, but things are still missing
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
11 |
#include "transport.h" |
c59d3eaff0fb
most of the new transport/sock code compiles, but things are still missing
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
12 |
|
c59d3eaff0fb
most of the new transport/sock code compiles, but things are still missing
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
13 |
/** |
c59d3eaff0fb
most of the new transport/sock code compiles, but things are still missing
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
14 |
* Connect the given transport via TCP to the given host/service. The transport will not be ready for use until the |
c59d3eaff0fb
most of the new transport/sock code compiles, but things are still missing
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
15 |
* transport_callbacks::on_connect callback has been invoked. |
c59d3eaff0fb
most of the new transport/sock code compiles, but things are still missing
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
16 |
* |
c59d3eaff0fb
most of the new transport/sock code compiles, but things are still missing
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
17 |
* XXX: blocking DNS resolution |
c59d3eaff0fb
most of the new transport/sock code compiles, but things are still missing
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
18 |
* |
c59d3eaff0fb
most of the new transport/sock code compiles, but things are still missing
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
19 |
* @param info the transport setup info |
c59d3eaff0fb
most of the new transport/sock code compiles, but things are still missing
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
20 |
* @param transport_ptr returned transport |
c59d3eaff0fb
most of the new transport/sock code compiles, but things are still missing
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
21 |
* @param host the hostname to connect to |
c59d3eaff0fb
most of the new transport/sock code compiles, but things are still missing
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
22 |
* @param service the service name (i.e. port) to connect to |
c59d3eaff0fb
most of the new transport/sock code compiles, but things are still missing
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
23 |
* @param err returned error info |
c59d3eaff0fb
most of the new transport/sock code compiles, but things are still missing
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
24 |
*/ |
c59d3eaff0fb
most of the new transport/sock code compiles, but things are still missing
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
25 |
err_t sock_tcp_connect (const struct transport_info *info, transport_t **transport_ptr, |
c59d3eaff0fb
most of the new transport/sock code compiles, but things are still missing
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
26 |
const char *host, const char *service, error_t *err); |
c59d3eaff0fb
most of the new transport/sock code compiles, but things are still missing
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
27 |
|
c59d3eaff0fb
most of the new transport/sock code compiles, but things are still missing
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
28 |
#endif |