forked from yagich/tickle-godot-frontend
		
	add initial server implementation
This commit is contained in:
		@@ -13,7 +13,7 @@ const Status = preload("res://addons/http_server/status.gd")
 | 
			
		||||
 | 
			
		||||
var __endpoints: Dictionary = {
 | 
			
		||||
	# key: [Int, String], array with 0 index representing method, 1 index representing endpoint
 | 
			
		||||
	# value: [FuncRef, Variant], index 0 = reference to function to call, index 1 = binds to pass to func
 | 
			
		||||
	# value: [FuncRef, Array], index 0 = reference to function to call, index 1 = binds to pass to func
 | 
			
		||||
}
 | 
			
		||||
var __fallback: FuncRef = null
 | 
			
		||||
var __server: TCP_Server = null
 | 
			
		||||
@@ -21,7 +21,7 @@ var __server: TCP_Server = null
 | 
			
		||||
 | 
			
		||||
# Public methods
 | 
			
		||||
 | 
			
		||||
func endpoint(type: int, endpoint: String, function: FuncRef, binds = null) -> void:
 | 
			
		||||
func endpoint(type: int, endpoint: String, function: FuncRef, binds: Array = []) -> void:
 | 
			
		||||
	var endpoint_hash: Array = [type, endpoint]
 | 
			
		||||
	if endpoint_hash in __endpoints:
 | 
			
		||||
		print(
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user