From: Bill Cunningham on 6 May 2010 15:49 I have received the Stevens book and it is certainly alot to absorb. But it looks worthwhile. Yesterday I got an idea to try and send an ack to a server. I tried this I don't know if it makes any sense or not. char ack='6'; This looks like assigning to ack the ANSI number of the number 6. Six is the ANSI code for ack. Also of course 0x06. I want to assign to ack the ANSI acknowledgement code. How is this done in the posix systemcall API? Is there a special sys call? BIll
From: Lew Pitcher on 6 May 2010 16:05 On May 6, 2010 15:49, in comp.unix.programmer, nospam(a)nspam.invalid wrote: > I have received the Stevens book and it is certainly alot to absorb. > But > it looks worthwhile. Yesterday I got an idea to try and send an ack to a > server. I tried this I don't know if it makes any sense or not. > > char ack='6'; > > This looks like assigning to ack the ANSI number of the number 6. By 'ANSI', I presume you mean 'ASCII'? > Six is the ANSI code for ack. Also of course 0x06. In ASCII, the ACKnowledgement character has a value of 0x06. In ASCII, the digit 6 character ('6') has a value of 0x36. > I want to assign to ack the ANSI acknowledgement code. char ack = 6; > How is this done in the posix systemcall API? No, just a simple assignment. > Is there a special sys call? No, just a simple assignment. However, with all of this, you have only assigned a value to a variable. You have not /sent/ that value to a server. /How/ you send that ACKnowledgement byte to the server depends on the communications interface you are using, and the server you are talking to. -- Lew Pitcher Master Codewright & JOAT-in-training | Registered Linux User #112576 Me: http://pitcher.digitalfreehold.ca/ | Just Linux: http://justlinux.ca/ ---------- Slackware - Because I know what I'm doing. ------
From: Bill Cunningham on 6 May 2010 16:58 "Lew Pitcher" <lpitcher(a)teksavvy.com> wrote in message news:AiFEn.7$rU6.1(a)newsfe10.iad... > By 'ANSI', I presume you mean 'ASCII'? > >> Six is the ANSI code for ack. Also of course 0x06. > > In ASCII, the ACKnowledgement character has a value of 0x06. > In ASCII, the digit 6 character ('6') has a value of 0x36. [...] Yes that's what I meant ASCII. Not ANSI. What sort of keyboard does modern linux/unix systems have? I know there's EBCDIC and ISO out there too. Bill
From: Torgny Lyon on 6 May 2010 17:17 "Bill Cunningham" <nospam(a)nspam.invalid> wrote: > Yes that's what I meant ASCII. Not ANSI. What sort of keyboard does > modern linux/unix systems have? That is unrelated to your previous question. However, you are free to use any keyboard that you like with your modern linux/unix system. > I know there's EBCDIC and ISO out there too. No, there is not. There are several character encodings around though. -- Torgny Lyon _ http://www.abc.se/~torgny/pubkey.asc ( ) The ASCII ribbon campaign X against HTML e-mail and / \ proprietary attachments
From: David Schwartz on 7 May 2010 10:38 On May 6, 12:49 pm, "Bill Cunningham" <nos...(a)nspam.invalid> wrote: > I want to assign to ack the ANSI > acknowledgement code. That doesn't seem to make any sense. I think you are confusing two very different concepts of acknowledgment. A TCP ACK is a low-level TCP thing that one TCP implementation sends another. It basically says "I, the TCP stack on the other end, have received these bytes. You can stop storing them in memory for possible retransmission, since no retransmission will be necessary". This is built into every TCP stack and is required for TCP to function. You cannot mess with it (other than controlling Nagle), nor would you want to. Note that this ACK is in the TCP header, not the data, so applications using TCP can (and should) ignore it. It is a TCP implementation detail -- part of how TCP magically works. There can also be application acknowledgments. These are sent by an application to let the other end know that it received something. The semantics of this ack are up to the application. It can be send under any circumstances the application protocol specifies and it can mean anything the application protocol says it means. You can acknowledge a byte, a message, an operation, or whatever. Applications send these acknowledgments the way they send any other data, and they're received on the other end as part of the normal stream. They often also indicate that the data is acceptable and have positive and negative versions. For example, from an SMTP exchange: > mail from: <lakjsdlaksjdlkj> < 550 <lakjsdlaksjdlkj(a)webmaster.com>, Sender unknown > mail from: <example(a)example.com> > 250 <example(a)example.com>, Sender ok The 550 is a negative acknowledgment. It says "I got your message, but I didn't like it". The "250" is a positive acknowledgment. It says "I see, go on". This is what an application acknowledgment can look like. It could just as easily have been a single character, say a + or a -. Or if the protocol uses only printable ASCII, you could use the ASCII ACK/NAK characters. But the ASCII ACK/NAK characters are not used by any popular protocols I know of. They're generally considered obsolete, and they certainly have nothing to do with TCP ACKs. The TCP ACK goes with the other TCP header flags such as SYN, RST, and PSH. DS
|
Next
|
Last
Pages: 1 2 Prev: verifying file ownership with dlopen() Next: Site for some reason, and forbidden |