FAQ
Hello, I've just released a simple implementation of rfc 1006 (i.e. ISO/IEC
8072/8073 transport class 0 on top of a TCP/IP):

https://github.com/danielePala/tosi
http://godoc.org/github.com/danielePala/tosi

I used the interfaces defined in the 'net' package
(http://golang.org/pkg/net), and in particular the Conn interface
(http://golang.org/pkg/net/#Conn): this requires the implementation of
methods called 'SetDeadLine', 'SetReadDeadLine' and 'SetWriteDeadLine', to
set a timeout for I/O operations. Right now I just wrapped the underlying
TCP method, however, a tosi Read or Write call may imply more than one TCP
Read or Write, so that the deadline may be surpassed.

I don't know how to implement these methods in a more consistent way, so
that the deadline is always respected. Anyone can help me?

Thanks a lot,
Daniele Pala

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Mikio Hara at Apr 13, 2013 at 11:02 am

    On Sat, Apr 13, 2013 at 7:18 PM, wrote:

    Hello, I've just released a simple implementation of rfc 1006 (i.e. ISO/IEC
    8072/8073 transport class 0 on top of a TCP/IP):
    Congrats, a few comments.

    - You can say just RFC 1006 in the package description because
    godoc.org can parse it
    - Also s/net.Dial/tosi.Dial/ in the package description
    - s/Tosi/TOSI/, like not Tcp but TCP in Go stdlib
    I don't know how to implement these methods in a more consistent way, so
    that the deadline is always respected. Anyone can help me?
    I guess you should implement own Deadline stuff if tosi.Read, Write require
    internal message exchange over TCP at each call.

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Pala Daniele at Apr 13, 2013 at 12:09 pm
    Thanks a lot for your comments!! I've updated the documentation and changed
    'Tosi' to 'TOSI' in the API.
    For the deadline question, the problem is that, generally, I don't know how
    many TCP transactions a tosi.Read will produce, for example, if I receive
    an invalid PDU I have to respond back with an ER (error) PDU, which
    requires a TCP Write...so there is no defined TCP deadline that I can set...

    Daniele Pala

    Il giorno sabato 13 aprile 2013 13:02:45 UTC+2, Mikio Hara ha scritto:
    On Sat, Apr 13, 2013 at 7:18 PM, <pala.d...@gmail.com <javascript:>>
    wrote:
    Hello, I've just released a simple implementation of rfc 1006 (i.e. ISO/IEC
    8072/8073 transport class 0 on top of a TCP/IP):
    Congrats, a few comments.

    - You can say just RFC 1006 in the package description because
    godoc.org can parse it
    - Also s/net.Dial/tosi.Dial/ in the package description
    - s/Tosi/TOSI/, like not Tcp but TCP in Go stdlib
    I don't know how to implement these methods in a more consistent way, so
    that the deadline is always respected. Anyone can help me?
    I guess you should implement own Deadline stuff if tosi.Read, Write
    require
    internal message exchange over TCP at each call.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Mikio Hara at Apr 13, 2013 at 3:55 pm

    On Sat, Apr 13, 2013 at 9:09 PM, wrote:

    For the deadline question, the problem is that, generally, I don't know how
    many TCP transactions a tosi.Read will produce, for example, if I receive an
    invalid PDU I have to respond back with an ER (error) PDU, which requires a
    TCP Write...so there is no defined TCP deadline that I can set...
    On solution would be that using every 10-30ms (an appropriate deadline)
    TCP read, write subsequent to main PDU read.

    P.S.
    s/net.Listen/tosi.Listen/ in the description.
    Selector might be better than Tsel at TOSIAddr.

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Pala Daniele at Apr 14, 2013 at 7:40 am
    mmm, or maybe I can put up something like the example shown in time.After
    (http://golang.org/pkg/time/#After)...need to think about that.
    Many thanks for the corrections, for the 'Tsel' name, for now I'll leave it
    as it is, I prefer short names :-)

    Daniele

    Il giorno sabato 13 aprile 2013 17:55:28 UTC+2, Mikio Hara ha scritto:
    On Sat, Apr 13, 2013 at 9:09 PM, <pala.d...@gmail.com <javascript:>>
    wrote:
    For the deadline question, the problem is that, generally, I don't know how
    many TCP transactions a tosi.Read will produce, for example, if I
    receive an
    invalid PDU I have to respond back with an ER (error) PDU, which
    requires a
    TCP Write...so there is no defined TCP deadline that I can set...
    On solution would be that using every 10-30ms (an appropriate deadline)
    TCP read, write subsequent to main PDU read.

    P.S.
    s/net.Listen/tosi.Listen/ in the description.
    Selector might be better than Tsel at TOSIAddr.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedApr 13, '13 at 10:18a
activeApr 14, '13 at 7:40a
posts5
users2
websitegolang.org

2 users in discussion

Pala Daniele: 3 posts Mikio Hara: 2 posts

People

Translate

site design / logo © 2021 Grokbase