Skip to content

Pluggin that allows to use a cloud (centralized) server to expand the range of a smart space

Notifications You must be signed in to change notification settings

UnBiquitous/http-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 

Repository files navigation

http-plugin

This is a uOS plugin for establishing a Smart Space based on a central server using HTTP-WebSockets.

Usage

You can select the device mode using the property ubiquitos.websocket.mode. By default the port used is the 8080.

Setting up a server

Programatically:

	UOS uos = new UOS()
	uos.start(new ServerMode.Properties());

Config File:

ubiquitos.connectionManager=org.unbiquitous.network.http.WebSocketConnectionManager
ubiquitos.radar=org.unbiquitous.network.http.WebSocketRadar(org.unbiquitous.network.http.WebSocketConnectionManager)
ubiquitos.websocket.mode=server

You can also configure ubiquitos.websocket.timeout setting up the connection timeout.

By default, the Server will keep a one on one connection with each device. Leaving client devices unaware of the existence of others. This is useful if you want the server to be the solely provider of information for these guys.

If you want to all devices to see each other. A relay option (ubiquitos.websocket.relayDevices) can be used to set the server to intermediate all connections. Connecting all clients to a single smart space.

Setting up a client

It's mandatory to inform the server address in order to create a client device.

Programatically:

	UOS uos = new UOS()
	ClientMode.Properties props = new ClientMode.Properties();
	props.setServer("www.my.server.net");
	uos.start(props);

Config File:

ubiquitos.connectionManager=org.unbiquitous.network.http.WebSocketConnectionManager
ubiquitos.radar=org.unbiquitous.network.http.WebSocketRadar(org.unbiquitous.network.http.WebSocketConnectionManager)
ubiquitos.websocket.mode=client
ubiquitos.websocket.server=www.my.server.net

About

Pluggin that allows to use a cloud (centralized) server to expand the range of a smart space

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages