func CreateServerWithNetConfig(numClients, lenMS, lenSalt int, directory string, fpRate float64, numUniqWords uint64, latency time.Duration, bandwidth int) (*Server, error) {
	s, err := CreateServer(numClients, lenMS, lenSalt, directory, fpRate, numUniqWords)
	s.latency = latency
	s.bandwidth = bandwidth
	s.writeToFile()
	return s, err
}
CreateServerWithNetConfig behaves the same as `CreateServer`, except for that it
also sets the network parameters for the server.
package server
import (
	"crypto/rand"
	"crypto/sha256"
	"encoding/gob"
	"fmt"
	"io/ioutil"
	"math"
	"os"
	"path"
	"search/prototype/index"
	"search/prototype/logger"
	"search/prototype/searcher"
	"search/prototype/util"
	"strconv"
	"time"
)
type Server struct {
	directory string         
	lenMS     int            
	keyHalves [][]byte       
	salts     [][]byte       
	numFiles  int            
	size      uint64         
	latency   time.Duration  
	bandwidth int            
}
func CreateServer(numClients, lenMS, lenSalt int, directory string, fpRate float64, numUniqWords uint64) (s *Server, err error) {
	s = new(Server)
	masterSecret := make([]byte, lenMS)
	rand.Read(masterSecret)
	s.keyHalves = make([][]byte, numClients)
	s.lenMS = lenMS
	for i := 0; i < numClients; i++ {
		h := sha256.New()
		h.Write([]byte(strconv.Itoa(i)))
		cksum := h.Sum(nil)
		s.keyHalves[i] = util.XorBytes(masterSecret, cksum, lenMS)
	}
	r := int(math.Ceil(-math.Log2(fpRate)))
	s.size = uint64(math.Ceil(float64(numUniqWords) * float64(r) / math.Log(2)))
	s.salts, err = util.GenerateSalts(r, lenSalt)
	if err != nil {
		return
	}
	s.numFiles = 0
	s.directory = directory
	s.writeToFile()
	return
}