Plan 9 from Bell Labs’s /usr/web/sources/extra/i/transport.c

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#include "i.h"

static Transport HTTPtrans = {
	httpinit, httpconnect, httpwritereq, httpgethdr, httpgetdata, httpdefaultport
};

static Transport FTPtrans = {
	ftpinit, ftpconnect, ftpwritereq, ftpgethdr, ftpgetdata, ftpdefaultport
};

static Transport FILEtrans = {
	fileinit, fileconnect, filewritereq, filegethdr, filegetdata, filedefaultport
};

// Track the scheme enums in i.h
Transport *transports[TRANSMAX] = {
	nil,			// NOSCHEME
	&HTTPtrans,	// HTTP
	&HTTPtrans,	// HTTPS
	&FTPtrans,	// FTP
	&FILEtrans	// FILE
};

void
transportinit(void)
{
	httpinit();
	ftpinit();
	fileinit();
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.