Allows 2 endpoints to exchange data reliably ovet the network. It is a Transport (4th) layer of OSI.
Connection between 2 computers is identified by:
- source IP
- source port
// From Stephen: | |
// This is the code that was written live on-stage on October 25, 2023. | |
// I've recreated a few of the tests / examples that I overwrote / deleted | |
// as I was building up the layers of functionality. | |
// Recommended follow-up reading: | |
// https://devblogs.microsoft.com/dotnet/how-async-await-really-works/ | |
using System.Collections.Concurrent; | |
using System.Runtime.CompilerServices; |
const GIRepository = imports.gi.GIRepository; | |
const GLib = imports.gi.GLib; | |
let libdir = GIRepository.Repository.get_search_path().find(path => { | |
return path.endsWith("/gjs/girepository-1.0"); | |
}).replace("/gjs/girepository-1.0", ""); | |
const gsdir = GLib.build_filenamev([libdir, "gnome-shell"]); | |
if (!GLib.file_test(gsdir, GLib.FileTest.IS_DIR)) { | |
const currentDir = `/${GLib.path_get_basename(libdir)}`; | |
libdir = libdir.replace(currentDir, ""); | |
} |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
// Typy danych | |
record Student(IEnumerable<SubjectWithMarks> Subjects); | |
record SubjectWithMarks(Subject Subject, Marks Marks); | |
record Marks(int Semester1Mark, int Semester2Mark); |
Function has an arguments
object containing all of the arguments passed by the called (even if function does not define any parameter, you can still pass arguments).
Arrow functions do not have this parameter.
this
is inherited from the scope where arrow function was defined.
HttpClient
uses implementations of HttpMessageHandler
to do its job. The default handler is HttpClientHandler
.
There may be a chain of handlers (delegating handler pattern). Messages go down throug handlers and responses go up to the HttpClient
. Any handler can decide not to pass message down and return a response earlier (i.e. caching).
_httpClient.BaseAddress = "http://www..google.pl";