diff --git a/.gitignore b/.gitignore index 0117bc1..0e8f062 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,148 @@ -/ClientPersistente/dist/ + # Compiled class file + *.class + + # Log file + *.log + + # BlueJ files + *.ctxt + + # Mobile Tools for Java (J2ME) + .mtj.tmp/ + + # Package Files # + *.jar + *.war + *.nar + *.ear + *.zip + *.tar.gz + *.rar + + # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml + hs_err_pid* + replay_pid* + + **/nbproject/private/ + **/nbproject/Makefile-*.mk + **/nbproject/Package-*.bash + build/ + nbbuild/ + dist/ + nbdist/ + .nb-gradle/ + + # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider + .idea/ + cmake-build-*/ + # File-based project format + *.iws + # IntelliJ + out/ + # mpeltonen/sbt-idea plugin + .idea_modules/ + # JIRA plugin + atlassian-ide-plugin.xml + # Crashlytics plugin (for Android Studio and IntelliJ) + com_crashlytics_export_strings.xml + crashlytics.properties + crashlytics-build.properties + fabric.properties + + ### - NetBeans + **/nbproject/private/ + **/nbproject/Makefile-*.mk + **/nbproject/Package-*.bash + build/ + nbbuild/ + nbdist/ + .nb-gradle/ + ### - Visual Studio Code + .vscode/* + !.vscode/settings.json + !.vscode/tasks.json + !.vscode/launch.json + !.vscode/extensions.json + !.vscode/*.code-snippets + # Local History for Visual Studio Code + .history/ + # Built Visual Studio Code Extensions + *.vsix + ### - XCode + ## User settings + xcuserdata/ + ## Xcode 8 and earlier + *.xcscmblueprint + *.xccheckout + + ##### - Linux + + *~ + + # temporary files which can be created if a process still has a handle open of a deleted file + .fuse_hidden* + + # KDE directory preferences + .directory + + # Linux trash folder which might appear on any partition or disk + .Trash-* + + # .nfs files are created when an open file is removed but is still being accessed + .nfs* + + ##### - Windows + + # Windows thumbnail cache files + Thumbs.db + Thumbs.db:encryptable + ehthumbs.db + ehthumbs_vista.db + + # Dump file + *.stackdump + + # Folder config file + [Dd]esktop.ini + + # Recycle Bin used on file shares + $RECYCLE.BIN/ + + # Windows Installer files + *.cab + *.msi + *.msix + *.msm + *.msp + + # Windows shortcuts + *.lnk + + ##### - MacOS + + # General + .DS_Store + .AppleDouble + .LSOverride + + # Icon must end with two \r + Icon + + # Thumbnails + ._* + + # Files that might appear in the root of a volume + .DocumentRevisions-V100 + .fseventsd + .Spotlight-V100 + .TemporaryItems + .Trashes + .VolumeIcon.icns + .com.apple.timemachine.donotpresent + + # Directories potentially created on remote AFP share + .AppleDB + .AppleDesktop + Network Trash Folder + Temporary Items + .apdisk \ No newline at end of file diff --git a/ClientAccademico/build/built-jar.properties b/ClientAccademico/build/built-jar.properties deleted file mode 100644 index dd3cce3..0000000 --- a/ClientAccademico/build/built-jar.properties +++ /dev/null @@ -1,4 +0,0 @@ -#Wed, 01 Feb 2023 15:55:04 +0100 - - -/home/boss/Progetti/ClientAccademico= diff --git a/ClientAccademico/build/classes/clientaccademico/ClientAccademico.class b/ClientAccademico/build/classes/clientaccademico/ClientAccademico.class deleted file mode 100644 index 2ed6ac0..0000000 Binary files a/ClientAccademico/build/classes/clientaccademico/ClientAccademico.class and /dev/null differ diff --git a/ClientPersistente/build/built-jar.properties b/ClientPersistente/build/built-jar.properties deleted file mode 100644 index 3f314bd..0000000 --- a/ClientPersistente/build/built-jar.properties +++ /dev/null @@ -1,4 +0,0 @@ -#Thu, 02 Feb 2023 00:11:23 +0100 - - -/home/boss/Progetti/Didattica_Socket/ClientPersistente= diff --git a/ClientPersistente/build/classes/.netbeans_automatic_build b/ClientPersistente/build/classes/.netbeans_automatic_build deleted file mode 100644 index e69de29..0000000 diff --git a/ClientPersistente/build/classes/.netbeans_update_resources b/ClientPersistente/build/classes/.netbeans_update_resources deleted file mode 100644 index e69de29..0000000 diff --git a/ClientPersistente/build/classes/clientpersistente/ClientPersistente.class b/ClientPersistente/build/classes/clientpersistente/ClientPersistente.class deleted file mode 100644 index dba359c..0000000 Binary files a/ClientPersistente/build/classes/clientpersistente/ClientPersistente.class and /dev/null differ diff --git a/ClientSconnesso/build.xml b/ClientSconnesso/build.xml new file mode 100644 index 0000000..73e8ebc --- /dev/null +++ b/ClientSconnesso/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project ClientSconnesso. + + + diff --git a/ClientAccademico/build/classes/.netbeans_automatic_build b/ClientSconnesso/build/classes/.netbeans_automatic_build similarity index 100% rename from ClientAccademico/build/classes/.netbeans_automatic_build rename to ClientSconnesso/build/classes/.netbeans_automatic_build diff --git a/ClientAccademico/build/classes/.netbeans_update_resources b/ClientSconnesso/build/classes/.netbeans_update_resources similarity index 100% rename from ClientAccademico/build/classes/.netbeans_update_resources rename to ClientSconnesso/build/classes/.netbeans_update_resources diff --git a/ClientSconnesso/build/classes/clientsconnesso/ClientSconnesso.class b/ClientSconnesso/build/classes/clientsconnesso/ClientSconnesso.class new file mode 100644 index 0000000..ac8f828 Binary files /dev/null and b/ClientSconnesso/build/classes/clientsconnesso/ClientSconnesso.class differ diff --git a/ClientSconnesso/manifest.mf b/ClientSconnesso/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/ClientSconnesso/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/ClientSconnesso/nbproject/build-impl.xml b/ClientSconnesso/nbproject/build-impl.xml new file mode 100644 index 0000000..d99b38e --- /dev/null +++ b/ClientSconnesso/nbproject/build-impl.xml @@ -0,0 +1,1771 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ClientSconnesso/nbproject/genfiles.properties b/ClientSconnesso/nbproject/genfiles.properties new file mode 100644 index 0000000..884d81f --- /dev/null +++ b/ClientSconnesso/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=3637ba01 +build.xml.script.CRC32=a66f0622 +build.xml.stylesheet.CRC32=f85dc8f2@1.105.0.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=3637ba01 +nbproject/build-impl.xml.script.CRC32=2a0a287b +nbproject/build-impl.xml.stylesheet.CRC32=12e0a6c2@1.105.0.48 diff --git a/ClientSconnesso/nbproject/private/private.properties b/ClientSconnesso/nbproject/private/private.properties new file mode 100644 index 0000000..1a2f6d1 --- /dev/null +++ b/ClientSconnesso/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=/home/docente/.netbeans/16/build.properties diff --git a/ClientSconnesso/nbproject/private/private.xml b/ClientSconnesso/nbproject/private/private.xml new file mode 100644 index 0000000..4750962 --- /dev/null +++ b/ClientSconnesso/nbproject/private/private.xml @@ -0,0 +1,4 @@ + + + + diff --git a/ClientSconnesso/nbproject/project.properties b/ClientSconnesso/nbproject/project.properties new file mode 100644 index 0000000..6ea5504 --- /dev/null +++ b/ClientSconnesso/nbproject/project.properties @@ -0,0 +1,97 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.modulepath=\ + ${run.modulepath} +debug.test.classpath=\ + ${run.test.classpath} +debug.test.modulepath=\ + ${run.test.modulepath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/ClientSconnesso.jar +dist.javadoc.dir=${dist.dir}/javadoc +dist.jlink.dir=${dist.dir}/jlink +dist.jlink.output=${dist.jlink.dir}/ClientSconnesso +excludes= +file.reference.USocket.jar=/home/docente/Modelli/USocket.jar +includes=** +jar.compress=false +javac.classpath=\ + ${file.reference.USocket.jar} +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.external.vm=true +javac.modulepath= +javac.processormodulepath= +javac.processorpath=\ + ${javac.classpath} +javac.source=17 +javac.target=17 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.modulepath=\ + ${javac.modulepath} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.html5=false +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +# The jlink additional root modules to resolve +jlink.additionalmodules= +# The jlink additional command line parameters +jlink.additionalparam= +jlink.launcher=true +jlink.launcher.name=ClientSconnesso +main.class=clientsconnesso.ClientSconnesso +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.modulepath=\ + ${javac.modulepath} +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +run.test.modulepath=\ + ${javac.test.modulepath} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/ClientSconnesso/nbproject/project.xml b/ClientSconnesso/nbproject/project.xml new file mode 100644 index 0000000..c30d994 --- /dev/null +++ b/ClientSconnesso/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + ClientSconnesso + + + + + + + + + diff --git a/ClientSconnesso/src/clientsconnesso/ClientSconnesso.java b/ClientSconnesso/src/clientsconnesso/ClientSconnesso.java new file mode 100644 index 0000000..c68f437 --- /dev/null +++ b/ClientSconnesso/src/clientsconnesso/ClientSconnesso.java @@ -0,0 +1,19 @@ +package clientsconnesso; + +import com.mirimatcode.UDatagram; +import java.io.IOException; + +public class ClientSconnesso { + + public static void main(String[] args) { + // TODO code application logic here + String messaggio = "Ciao amico server"; + + try { + UDatagram.writeString("192.168.1.175", 5000, messaggio); + } catch (IOException ex) { + System.out.println(ex.getMessage()); + } + } + +} diff --git a/ServerAccademico/build/built-jar.properties b/ServerAccademico/build/built-jar.properties deleted file mode 100644 index 1f370c5..0000000 --- a/ServerAccademico/build/built-jar.properties +++ /dev/null @@ -1,4 +0,0 @@ -#Wed, 01 Feb 2023 15:45:34 +0100 - - -/home/boss/Progetti/ServerAccademico= diff --git a/ServerAccademico/build/classes/serveraccademico/ServerAccademico.class b/ServerAccademico/build/classes/serveraccademico/ServerAccademico.class deleted file mode 100644 index ade7d95..0000000 Binary files a/ServerAccademico/build/classes/serveraccademico/ServerAccademico.class and /dev/null differ diff --git a/ServerAccademico/nbproject/private/private.properties b/ServerAccademico/nbproject/private/private.properties index ea67f5f..1a2f6d1 100644 --- a/ServerAccademico/nbproject/private/private.properties +++ b/ServerAccademico/nbproject/private/private.properties @@ -1,2 +1,2 @@ compile.on.save=true -user.properties.file=/home/boss/.netbeans/16/build.properties +user.properties.file=/home/docente/.netbeans/16/build.properties diff --git a/ServerAccademico/nbproject/private/private.xml b/ServerAccademico/nbproject/private/private.xml new file mode 100644 index 0000000..4750962 --- /dev/null +++ b/ServerAccademico/nbproject/private/private.xml @@ -0,0 +1,4 @@ + + + + diff --git a/ServerPersistente/build/built-jar.properties b/ServerPersistente/build/built-jar.properties deleted file mode 100644 index 1041c69..0000000 --- a/ServerPersistente/build/built-jar.properties +++ /dev/null @@ -1,4 +0,0 @@ -#Thu, 02 Feb 2023 00:11:26 +0100 - - -/home/boss/Progetti/Didattica_Socket/ServerPersistente= diff --git a/ServerPersistente/build/classes/serverpersistente/ServerPersistente.class b/ServerPersistente/build/classes/serverpersistente/ServerPersistente.class deleted file mode 100644 index 973fb53..0000000 Binary files a/ServerPersistente/build/classes/serverpersistente/ServerPersistente.class and /dev/null differ diff --git a/ServerSconnesso/build.xml b/ServerSconnesso/build.xml new file mode 100644 index 0000000..934667f --- /dev/null +++ b/ServerSconnesso/build.xml @@ -0,0 +1,107 @@ + + + + + + + + + + + Builds, tests, and runs the project ServerSconnesso. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ServerSconnesso/build/built-jar.properties b/ServerSconnesso/build/built-jar.properties new file mode 100644 index 0000000..a985434 --- /dev/null +++ b/ServerSconnesso/build/built-jar.properties @@ -0,0 +1,4 @@ +#Fri, 03 Feb 2023 12:12:07 +0100 + + +/home/docente/Progetti/ServerSconnesso= diff --git a/ServerSconnesso/build/classes/serversconnesso/ServerSconnesso.class b/ServerSconnesso/build/classes/serversconnesso/ServerSconnesso.class new file mode 100644 index 0000000..f74196d Binary files /dev/null and b/ServerSconnesso/build/classes/serversconnesso/ServerSconnesso.class differ diff --git a/ServerSconnesso/dist/ServerSconnesso.jar b/ServerSconnesso/dist/ServerSconnesso.jar new file mode 100644 index 0000000..3471d48 Binary files /dev/null and b/ServerSconnesso/dist/ServerSconnesso.jar differ diff --git a/ServerSconnesso/manifest.mf b/ServerSconnesso/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/ServerSconnesso/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/ServerSconnesso/nbproject/build-impl.xml b/ServerSconnesso/nbproject/build-impl.xml new file mode 100644 index 0000000..7b2a4a8 --- /dev/null +++ b/ServerSconnesso/nbproject/build-impl.xml @@ -0,0 +1,1771 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ServerSconnesso/nbproject/genfiles.properties b/ServerSconnesso/nbproject/genfiles.properties new file mode 100644 index 0000000..d628c8d --- /dev/null +++ b/ServerSconnesso/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=ac40c2b2 +build.xml.script.CRC32=5da9665b +build.xml.stylesheet.CRC32=f85dc8f2@1.105.0.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=ac40c2b2 +nbproject/build-impl.xml.script.CRC32=80d3de00 +nbproject/build-impl.xml.stylesheet.CRC32=12e0a6c2@1.105.0.48 diff --git a/ServerSconnesso/nbproject/private/private.properties b/ServerSconnesso/nbproject/private/private.properties new file mode 100644 index 0000000..1a2f6d1 --- /dev/null +++ b/ServerSconnesso/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=/home/docente/.netbeans/16/build.properties diff --git a/ServerSconnesso/nbproject/private/private.xml b/ServerSconnesso/nbproject/private/private.xml new file mode 100644 index 0000000..4750962 --- /dev/null +++ b/ServerSconnesso/nbproject/private/private.xml @@ -0,0 +1,4 @@ + + + + diff --git a/ServerSconnesso/nbproject/project.properties b/ServerSconnesso/nbproject/project.properties new file mode 100644 index 0000000..8ca4f4c --- /dev/null +++ b/ServerSconnesso/nbproject/project.properties @@ -0,0 +1,97 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.modulepath=\ + ${run.modulepath} +debug.test.classpath=\ + ${run.test.classpath} +debug.test.modulepath=\ + ${run.test.modulepath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/ServerSconnesso.jar +dist.javadoc.dir=${dist.dir}/javadoc +dist.jlink.dir=${dist.dir}/jlink +dist.jlink.output=${dist.jlink.dir}/ServerSconnesso +excludes= +file.reference.USocket.jar=/home/docente/Modelli/USocket.jar +includes=** +jar.compress=false +javac.classpath=\ + ${file.reference.USocket.jar} +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.external.vm=true +javac.modulepath= +javac.processormodulepath= +javac.processorpath=\ + ${javac.classpath} +javac.source=17 +javac.target=17 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.modulepath=\ + ${javac.modulepath} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.html5=false +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +# The jlink additional root modules to resolve +jlink.additionalmodules= +# The jlink additional command line parameters +jlink.additionalparam= +jlink.launcher=true +jlink.launcher.name=ServerSconnesso +main.class=serversconnesso.ServerSconnesso +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.modulepath=\ + ${javac.modulepath} +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +run.test.modulepath=\ + ${javac.test.modulepath} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/ServerSconnesso/nbproject/project.xml b/ServerSconnesso/nbproject/project.xml new file mode 100644 index 0000000..02198aa --- /dev/null +++ b/ServerSconnesso/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + ServerSconnesso + + + + + + + + + diff --git a/ServerSconnesso/src/serversconnesso/ServerSconnesso.java b/ServerSconnesso/src/serversconnesso/ServerSconnesso.java new file mode 100644 index 0000000..59bb533 --- /dev/null +++ b/ServerSconnesso/src/serversconnesso/ServerSconnesso.java @@ -0,0 +1,17 @@ +package serversconnesso; + +import com.mirimatcode.UDatagram; +import java.io.IOException; + +public class ServerSconnesso { + + public static void main(String[] args) { + + try { + String messaggio_ricevuto = UDatagram.listenString(5000); + System.out.println("Ho ricevuto qualcosa del genere: " + messaggio_ricevuto); + } catch (IOException ex) { + System.out.println(ex.getMessage()); + } + } +} \ No newline at end of file diff --git a/USocket/dist/USocket.jar b/USocket/dist/USocket.jar index df2207c..acfd1ea 100644 Binary files a/USocket/dist/USocket.jar and b/USocket/dist/USocket.jar differ diff --git a/USocket/nbproject/private/private.properties b/USocket/nbproject/private/private.properties index ea67f5f..1a2f6d1 100644 --- a/USocket/nbproject/private/private.properties +++ b/USocket/nbproject/private/private.properties @@ -1,2 +1,2 @@ compile.on.save=true -user.properties.file=/home/boss/.netbeans/16/build.properties +user.properties.file=/home/docente/.netbeans/16/build.properties diff --git a/USocket/src/com/mirimatcode/UDatagram.java b/USocket/src/com/mirimatcode/UDatagram.java new file mode 100644 index 0000000..7781603 --- /dev/null +++ b/USocket/src/com/mirimatcode/UDatagram.java @@ -0,0 +1,42 @@ +package com.mirimatcode; + +import java.io.IOException; +import java.net.DatagramPacket; +import java.net.DatagramSocket; +import java.net.InetAddress; +import java.net.SocketException; + +public class UDatagram { + + static final int dim_buffer = 1024; + + public static String listenString(int porta) throws SocketException, IOException { + + DatagramSocket server = new DatagramSocket(porta); + byte[] buffer = new byte[dim_buffer]; + DatagramPacket pacchetto = new DatagramPacket(buffer, dim_buffer); + + System.out.println("Datagram Server in ascolto"); + server.receive(pacchetto); + + System.out.println("Ho ricevuto un messaggio da: " + pacchetto.getAddress().getHostAddress()); + String messaggio = new String(pacchetto.getData()); + + server.close(); + + return messaggio; + } + + public static void writeString(String host, int porta, String messaggio) throws IOException { + + InetAddress destinatario = InetAddress.getByName(host); + DatagramSocket client = new DatagramSocket(); + + byte[] flusso_messaggio = messaggio.getBytes(); + DatagramPacket pacchetto = new DatagramPacket(flusso_messaggio, flusso_messaggio.length, destinatario, porta); + + client.send(pacchetto); + + client.close(); + } +} diff --git a/USocket/src/com/mirimatcode/USocket.java b/USocket/src/com/mirimatcode/USocket.java index 2999760..5d47c99 100644 --- a/USocket/src/com/mirimatcode/USocket.java +++ b/USocket/src/com/mirimatcode/USocket.java @@ -97,6 +97,7 @@ public class USocket { * @throws UnknownHostException * @throws IOException */ + public static String writeAndListenString(String ip, int porta, String messaggio) throws UnknownHostException, IOException { Socket client = new Socket(ip, porta);