Message150723
| Author |
pitrou |
| Recipients |
BreamoreBoy, gearb0x, jnoller, neologix, news1234, pitrou |
| Date |
2012年01月06日.12:30:37 |
| SpamBayes Score |
2.6534215e-06 |
| Marked as misclassified |
No |
| Message-id |
<1325852961.3341.2.camel@localhost.localdomain> |
| In-reply-to |
<1325816333.91.0.969165023049.issue8184@psf.upfronthosting.co.za> |
| Content |
Le vendredi 06 janvier 2012 à 02:18 +0000, Phill a écrit :
> Phill <beerb0x@gmail.com> added the comment:
>
> Rather than listening on a socket, listening on a named pipe
>
> eg:
> address = (r'\\.\pipe\Test', 'AF_PIPE')
> listener = Listener(*address)
> conn = listener.accept()
>
> It doesnt raise an exception when i run the script again a second time.
According to MSDN, this is normal:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa365150%28v=vs.85%29.aspx
However, there's also a flag named FILE_FLAG_FIRST_PIPE_INSTANCE that we
could use in PipeListener, which would then raise an error if a listener
pipe was created a second time. It would probably make more sense,
although I don't know whether some programs may rely on creating a pipe
multiple times. |
|