http - Why should I usually choose the socket protocol for implementing other protocols? -


suppose want implement client ftp and, maybe, sftp well. programming language irrelevant. go ahead , choose socket library programming language x , implement ftp client. , that's it.

my question is, why did have choose socket library or socket protocol? why neither http library, nor icmp, nor ssh, nor ip, nor else?

... why did have choose socket library or socket protocol? why neither http library, nor icmp, nor ssh, nor ip, nor else?

you did not need to chose socket library. there variety of higher level libraries in various programming languages let use application protocol without bothering socket layer. examples http bindings libcurl various languages, lwp perl, requests python... .

... implementing other protocols?

of course if want implement instead of use application protocol explicitly decide not use of existing libraries specific protocol. should use layer below protocol want implement. implementing protocols http transport layer (i.e. use sockets api), implementing higher level protocols soap or rest on http http layer (i.e. use http library).

in case of ftp next lower layer transport layer, need use socket api. in case of sftp maybe can use library implementing ssh protocol since sftp protocol using ssh protocol.


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -