Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
LSH
lsh
Commits
4027d5f6
Commit
4027d5f6
authored
Feb 27, 2004
by
Niels Möller
Browse files
(channel_forward_start_io_read): New function.
Rev: src/channel_forward.c:1.14 Rev: src/channel_forward.h:1.8
parent
827a57d4
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/channel_forward.c
View file @
4027d5f6
...
...
@@ -140,6 +140,23 @@ channel_forward_start_io(struct channel_forward *channel)
channel
->
socket
->
write_buffer
->
report
=
&
channel
->
super
.
super
;
}
/* Like above, but doesn't install a new write buffer. Used by the socks server. */
void
channel_forward_start_io_read
(
struct
channel_forward
*
channel
)
{
channel
->
super
.
receive
=
do_channel_forward_receive
;
channel
->
super
.
send_adjust
=
do_channel_forward_send_adjust
;
channel
->
super
.
eof
=
do_channel_forward_eof
;
/* Install callbacks on the local socket. Leave write callbacks alone */
io_read
(
channel
->
socket
,
make_channel_read_data
(
&
channel
->
super
),
make_channel_read_close_callback
(
&
channel
->
super
));
/* Flow control */
channel
->
socket
->
write_buffer
->
report
=
&
channel
->
super
.
super
;
}
/* Used by the party requesting tcp forwarding, i.e. when a socket is
* already open, and we have asked the other end to forward it. Takes
* a channel as argument, and connects it to the socket. Returns the
...
...
src/channel_forward.h
View file @
4027d5f6
...
...
@@ -50,6 +50,9 @@ make_channel_forward(struct lsh_fd *socket, uint32_t initial_window);
void
channel_forward_start_io
(
struct
channel_forward
*
channel_forward
);
void
channel_forward_start_io_read
(
struct
channel_forward
*
channel
);
extern
struct
command
start_io_command
;
#define START_IO (&start_io_command.super)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment