Abstract
Even in PowerShell scripts, we have some pretty awesome network functionality especially since we can leverage the .Net framework and all of its helper objects. We can write scripts to open ports, connect to them, and send and receive messages. Writing a multiplayer game in PowerShell would certainly prove your knowledge and make all of your colleagues jealous of your ninja skills. In this chapter, we are going to start by writing a very simple server script that will open a port and listen for new connections and pick up new messages it receives. We will then write a client script that will read a line of input from the user and send it to the server script to be displayed to the console. From these basic beginnings, you will have the foundations to write any networking script you require from a small web server or chat messaging system through to multiplayer games.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2021 The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature
About this chapter
Cite this chapter
Waters, I. (2021). Networking. In: PowerShell for Beginners. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-7064-6_16
Download citation
DOI: https://doi.org/10.1007/978-1-4842-7064-6_16
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-7063-9
Online ISBN: 978-1-4842-7064-6
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)