Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bley/twisted doesn't send data if the "client" closes the write handle of the socket #5

Closed
idl0r opened this issue Dec 5, 2010 · 1 comment

Comments

@idl0r
Copy link

idl0r commented Dec 5, 2010

Simple test case:

#!/usr/bin/perl -w

use strict;
use IO::Socket::INET;

my $sock = IO::Socket::INET->new( PeerAddr => "127.0.0.1", PeerPort => 1337,
        Proto => "tcp");

if($sock->connected()) {
    print $sock "helo_name=mail-fx0-f49.google.com\n";
    print $sock "sender=foobar\@gmail.com\n";
    print $sock "recipient=user\@example.org\n";
    print $sock "client_address=209.85.161.49\n";
    print $sock "client_name=gmail.com\n\n";
    shutdown($sock, 1); # We have stopped writing data

    while(my $line = <$sock>) {
        $line =~ s/\r/\\r/g;
        $line =~ s/\n/\\n/g;
        print "IN: ".$line."\n";
    }
}
close($sock);

Try it with and without the shutdown();

@evgeni
Copy link
Owner

evgeni commented Dec 5, 2010

implement IHalfCloseableProtocol so exim can do its shutdown(fd, SHUT_WR)

closed by b948b6b

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants