1

When using web browsers, the application layer protocol being used is HTTP. Whereas I frequently use sockets to create a connection to a server and pass along strings, a frequently used example in Python could be

import socket

clientsocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
clientsocket.connect(('localhost', 8089))
clientsocket.send('hello')

What application layer protocol is being used when sending the string 'hello' with this basic example?

J.Doe
  • 61
  • 1
  • 1
    @oguzismail: I don't think that a simple google search would answer this question as you claim - but maybe you could explain in more detail which question should have been asked and which of the search results would actually answer the question and how. Apart from that - sending data over a socket like done by the OP is actually considered data transfer at the application layer, even if no standard application layer protocol is used. At the end HTTP is also only data transfer over a socket, with the difference that a standardized application layer protocol is used. – Steffen Ullrich Oct 04 '18 at 14:23

1 Answers1

2

No specific application layer protocol is used in your case. An application layer protocol is some kind of standard how messages are exchanged on top of TCP/UDP whatever transport layer. These standards are defined so that different implementations can interact with each other by just implementing the specific standard.

You can also use sockets without using a standardized application layer protocols but instead just make up what kind of messages you send by your own - and this is exactly what you did.

Steffen Ullrich
  • 114,247
  • 10
  • 131
  • 172